How to calculate the surface area of cuboid in C

1 Answer

0 votes
#include <stdio.h>

int main(void) {
    float length, width, height;
         
    length = 6;
    width = 3;
    height = 4;
         
    float surfacearea = 2 * (length * width + width * height + height * length);
         
    printf("Surface Area of Cuboid is = %.2f", surfacearea);
        
    return 0;
}
 
 
 
  
/*
run:
  
Surface Area of Cuboid is = 108.00
  
*/

 



answered Sep 10, 2021 by avibootz
...