How to calculate surface area of cone in C

1 Answer

0 votes
#include <stdio.h>
#include <math.h>

int main(void) {
    float r = 5;
    float h = 13;

    double SurfaceArea = M_PI * r * (r + sqrt((h * h) + (r * r)));

    printf("Surface Area of Cone = %f", SurfaceArea);
}




/*
run:

Surface Area of Cone = 297.326428

*/

 



answered Sep 11, 2021 by avibootz

Related questions

1 answer 142 views
1 answer 141 views
1 answer 179 views
1 answer 132 views
1 answer 186 views
1 answer 123 views
1 answer 122 views
...