0
How to find surface area of cuboid in c language
Surface area of cuboid=2*(wl+lb+hw) Input format First line=length of cuboid Second line=width of the cuboid Third line=height of the cuboid
7 Respostas
+ 4
pamu shravya ,
the programming task is quite easy, you need to have the formula that is required for this calculation:
total surface area of cuboid: s = 2 (lb + bh + lh), where l = length, b = breadth, h = height
+ 4
pamu shravya
You forgot semicolon in 6th line and the variable name in printf
#include <stdio.h>
int main()
{ float length,width,height;
float surfacearea;
printf ("\n enter length,width,height");
scanf("%f%f%f",&length,&width,&height);
surfacearea=2*(width*length+length*height+height*width);
printf("\n'surfacearea'=%.2f\n",surfacearea );
return 0;
}
+ 2
Your code seemed to have only some minor careless errors. Here, I've fixed those for you =)
https://code.sololearn.com/cE95thuvbeGe/?ref=app
+ 1
Thank you so much
0
Show your attempt.
0
None of those links works. Post your code in the code playground and link it here.