# C Program to find Volume and Surface Area of Sphere

How to write C Program to find Volume and Surface area of Sphere with example. Before we step into the C Program to find Volume and Surface Area of Sphere, Let see the definitions and formulas behind the Surface area of Sphere and Volume of Sphere

## C Surface Area of Sphere

A Sphere looks like a basketball, or we can say the three-dimensional view of a circle. If we know the radius of the Sphere then we can calculate the Surface Area of Sphere using the formula:

Surface Area of a Sphere = 4πr² (Where r is the radius of the sphere).

From the above formula, If we know the Surface Area of a sphere, then we can calculate the radius of a Sphere using the formula:

Radius of a Sphere = √sa / 4π (Where sa is the Surface Area of a sphere).

### C Volume of Sphere

The amount of space inside the sphere called Volume. If we know the radius of the Sphere then we can calculate the Volume of Sphere using the formula:

The volume of a Sphere = 4πr³

## C Program to find Volume and Surface Area of Sphere

We defined pi as a global variable and assigned value as 3.14. This C program allows the user to enter the value of a radius. Then it will calculate the Surface Area and Volume of a Sphere as per the formula.

```/* C Program to find Volume and Surface Area of Sphere */

#include <stdio.h>

#define PI 3.14

int main()
{

printf("\n The Surface area of a Sphere = %.2f", sa);
printf("\n The Volume of a Sphere = %.2f", Volume);

return 0;
}```

In this C program to find Volume and Surface Area of Sphere example, We have entered the Radius of a Sphere = 5

The Surface Area of a Sphere is
Surface Area = 4πr²
Surface Area = 4 * 3.14 * 5 * 5
Surface Area = 314

The Volume of a Sphere is
Volume = 4πr³