diff --git a/C7/ex2.c b/C7/ex2.c new file mode 100644 index 0000000..207f22b --- /dev/null +++ b/C7/ex2.c @@ -0,0 +1,11 @@ +#include +#include + +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); +}