Contact: aviboots(AT)netvision.net.il
32,309 questions
42,484 answers
573 users
#include <stdio.h> #include <math.h> int main() { int x = 27; //cube = x**3 //cuberoot = x**(1/3) printf("cube = %d\n", (int)pow(x, 3)); printf("cuberoot = %d\n", (int)round(pow(x, 1.0 / 3.0))); return 0; } /* run: cube = 19683 cuberoot = 3 */