Files
MMME3085_Lab_1/C5/ex5.c

12 lines
213 B
C

#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);
}