Thursday, 28 January 2016

Cube Root of Number Program in C++

Cube Root of Number Program in C++

Hello friends, Hitesh is here Today I will give you code to write Cube Root of Number Program in C++. To find the cube root of any number in programming calculates 0.3 power of number.

Cube Root of Number Program in C++

Cube root of Number Program in C++

#include<stdio.h>
#include<math.h>
 int main ()
 {
 double num, result;
 printf("Enter any number:");
scanf("%d",num);
 result = cbrt(num);
 printf ("Cube Root: %f", result);
 return 0;
 }

Output:

Enter any number: 27
Cube Root: 3.000

No comments:

Post a Comment