Find the volume of a rectangular box.
formula:
volume = lwh
algorithm volume:
input: | length, width, height |
process: | volume = length * width * height |
output: | display volume |
code:
#include<stdio.h> main() { int l,w,h,volume; clrscr(); printf(“Enter the value of length: \n Enter the value of width: \n Enter the value of height: \n”); scanf(“%d-%d-%d”,&l,&w,&h); volume=l*w*h; printf(“The volume of a rectangular box is: %d \n”,volume); getch(); } |
Recent Comments