This repository has been archived on 2023-10-26. You can view files and clone it, but cannot push or open issues or pull requests.
VSMechatronics/Exercises/C7/ex3.c

14 lines
254 B
C
Raw Permalink Normal View History

2023-10-03 11:16:10 +00:00
#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);
}