C Program to Find Volume and Surface Area of Sphere

In this tutorial you will learn about the C Program to Find Volume and Surface Area of Sphere and its application with practical example.

C Program to Find Volume and Surface Area of a Sphere

In this tutorial, we will learn to create a C program that will Find the Volume and Surface Area of a Sphere in C programming.

Prerequisites

Before starting with this tutorial, we assume that you are the best aware of the following C programming topics:

  • Operators in C Programming.
  • Basic Input and Output function in C Programming.
  • Basic C programming.
  • Arithmetic operations in C programming.

What is a Sphere?

The sphere is a ball-like geometrical 3d shape which is having a diameter equal in all positions going through the center.

Algorithm:-

Program description:-

In this tutorial, we will create a program, that will find the Volume and Surface Area of the sphere. we will First, take the radius of the sphere as input from the user. Then we will calculate the surface area and the volume of a sphere using arithmetic expressions. At last, we will print the Volume and Surface Area of a sphere.

Program Code:-

Output:-

In the above program, we have first initialized the required variable.

 

  •  rad = it will hold the integer value for the input radius of the sphere.
  •  sa = it will hold the integer the surface area of the sphere
  •  vol = it will hold the value of the volume of the sphere.

Taking the input radius of the sphere.

Calculating the surface area & volume of the sphere.

Printing the volume and surface area of the sphere.

In this tutorial we have learn about the C Program to Find Volume and Surface Area of Sphere and its application with practical example. I hope you will like this tutorial.