/************************/ /* cube_abs.c */ /* Weiwei Chen 07/11/12 */ /************************/ #include int absolute(int x); int cube_abs(int x); int dummy = 0; int main(void) { int a, absa3; printf("Please input an integer: "); scanf("%d", &a); absa3 = cube_abs(a); printf("The cube of the absoluate value of %d is %d.\n", a, absa3); return 0; } int cube_abs(int x) { int res; res = absolute(x); return res * res * res; } int absolute(int x) { return x > 0 ? x : -x; }