c#,find,cube,root,of,given,number

Ron 8/15/2016 0

This Code Shows How to Find the Cube Root of a Given Number

C#
 using System;
class CubeRoot
{
    public static void Main()
    {
        double num, res;
        Console.Write("Enter the Number : ");
        num = double.Parse(Console.ReadLine());
        res = Math.Ceiling(Math.Pow(num, (double)1 / 3));
        Console.Write("Cube Root : "   res);
 
    }
} 

/*
Here is the output of the C# Program: Enter the Number : 8 Cube Root : 2

*/

Report Bug

Please Login to Report Bug

Reported Bugs

Comments

Please Login to Comment

Comments