Saturday, March 6, 2021

C program to calculate and print the volume of a box.

 

1.     Write a C program to calculate and print the volume of a box.

 

#include<stdio.h>

#include<conio.h>

int main()

{

int l,b,h,v;

printf("Enter length: ");

scanf("%d", &l);

printf("Enter breadth: ");

scanf("%d", &b);

printf("Enter height: ");

scanf("%d", &h);

v=l*b*h;

printf("Volume of box= %d", v);

return 0;

}

No comments:

Post a Comment