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/C5/ex5.c

12 lines
213 B
C
Raw Normal View History

2023-10-03 10:43:48 +00:00
#include <stdio.h>
#include <math.h>
int main() {
float r;
printf("Enter radius: ");
scanf("%f", &r);
printf("Area of circle: %0.2f\n", M_PI*r*r);
printf("Volume of sphere: %.02f\n", M_PI*r*r*r*4.0/3.0);
}