C cbrt function calculates the cube root
Syntax
C cbrt functions have the following format.
float cbrtf(float num);
double cbrt(double num);
long double cbrtl(long double num);
Header
C cbrt functions are from header file math.h
.
Description
C cbrt functions return the cube root of num
.
Example
The following code shows how to calculate the cube root.
#include <math.h>// w ww. j a va2s . com
#include <stdio.h>
int main(void)
{
printf("%f", cbrt(8));
}
The code above generates the following result.