You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
416 B
C#

/*
* C# Program to Find the Cube Root of a Given Number
*/
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);
}
}
/*
Enter the Number : 8
Cube Root : 2