/* cube.c */ /* calculte the volume of a cube*/ /* author: Weiwei Chen */ /* date: Oct. 5. 2010 */ #include int main(void) { float s = 0; /* edge length of the cube */ float V = 0; /* volume of the cube */ printf("Please enter the edge length of the cube: "); scanf("%f", &s); V = s*s*s; printf("The volume of the cube (edge length = %f) is: %f \n", s, V); return 0; }