/* * cube.c * * Created on: Dec 10, 2021 * Author: johnsontimoj */ /////////////////////////////////////// // // program to calculate some cube values // // inputs: edge length // outputs: some calculated values // ////////////////////////////////////// #include int main(void){ setbuf(stdout, NULL); // local variables float e; float vol; // splash printf("Welcome to my cube program\n"); // infinite loop while(1){ // get inputs // printf("Please enter a value for the width: "); // scanf("%f", &w); // printf("Please enter a value for the length: "); // scanf("%f", &l); // printf("Please enter a value for the height: "); // scanf("%f", &h); printf("Please enter a value for the edge length: "); scanf("%f", &e); // calculations vol = e * e * e; // print results printf("The volume of your cube is %f\n", vol); }// end of while return 0; }// end main