/* * box.c * * Created on: Dec 10, 2021 * Author: johnsontimoj */ /////////////////////////////////////// // // program to calculate some box values // // inputs: w, l, h // outputs: some calculated values // ////////////////////////////////////// #include int main(void){ setbuf(stdout, NULL); // local variables float w; float l; float h; float vol; // splash printf("Welcome to my box 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 width, length and height: "); scanf("%f %f %f", &w, &l, &h); // calculations vol = w * l * h; // print results printf("The volume of your box is %f\n", vol); }// end of while return 0; }// end main