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

12 lines
207 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: %f\n", M_PI*r*r);
printf("Volume of sphere: %f\n", M_PI*r*r*r*4.0/3.0);
}