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

18th Oct 2021, 1:16 PM
morgan
morgan - avatar
7 ответов
+ 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
18th Oct 2021, 2:07 PM
Lothar
Lothar - avatar
+ 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; }
18th Oct 2021, 4:15 PM
Arun Ruban SJ
Arun Ruban SJ - avatar
+ 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
18th Oct 2021, 4:13 PM
Rishi
Rishi - avatar
+ 1
Thank you so much
18th Oct 2021, 4:43 PM
morgan
morgan - avatar
0
Show your attempt.
18th Oct 2021, 1:52 PM
Simon Sauter
Simon Sauter - avatar
0
None of those links works. Post your code in the code playground and link it here.
18th Oct 2021, 2:07 PM
Simon Sauter
Simon Sauter - avatar
18th Oct 2021, 2:16 PM
morgan
morgan - avatar