From abc01ee7764c6f994c23b920a445fe2fc24dde56 Mon Sep 17 00:00:00 2001 From: Alvie Rahman Date: Tue, 3 Oct 2023 11:58:39 +0100 Subject: [PATCH] c7ex2 --- C7/ex2.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 C7/ex2.c 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); +}