print area of sphere not circle

This commit is contained in:
Akbar Rahman 2023-10-03 12:41:18 +01:00
parent b3554501ed
commit cd1d50183b
Signed by: alvierahman90
GPG Key ID: 20609519444A1269

View File

@ -6,6 +6,6 @@ int main() {
printf("Enter radius: ");
scanf("%f", &r);
printf("Area of circle: %f\n", M_PI*r*r);
printf("Area of sphere: %f\n", 4.0*M_PI*r*r);
printf("Volume of sphere: %f\n", M_PI*r*r*r*4.0/3.0);
}