‘C’ program to print surface area (surface area=2(lb+lh+bh) of cuboid.
C File =>
/* Write a ‘C’ program to accept three dimensions length (l), breadth(b) and height(h) of a cuboid and print surface area (surface area=2(lb+lh+bh)*/
#include<stdio.h>
int main()
{
int l,b,h;
printf("\n Enter length : ");
scanf("%d",&l);
printf("\n Enter breadth : ");
scanf("%d",&b);
printf("\n Enter height : ");
scanf("%d",&h);
printf("\n Surface Area of cuboid = %d",2*(l*b+l*h+b*h));
return 0;
}
Comments
Post a Comment
Please do not enter any spam link in message.