14 lines
254 B
C
14 lines
254 B
C
#include <stdio.h>
|
|
#include <math.h>
|
|
|
|
int main() {
|
|
float radius, height;
|
|
|
|
printf("Enter radius: ");
|
|
scanf("%f", &radius);
|
|
printf("Enter height: ");
|
|
scanf("%f", &height);
|
|
|
|
printf("Surface area: %f\n", 2*M_PI*radius*radius + 2*M_PI*radius*height);
|
|
}
|