# C Program to Find Volume and Surface Area of a Cylinder

In this tutorial, i am going to show you how to find or calculate volume and surface area of Cylinder with the help of standard formula and function in c programs.

## All C Programs to Find Volume and Surface Area of Cylinder

• C Program to Find Volume and Surface Area of Cylinder using Standard Formula
• C Program to Find Volume and Surface Area of Cylinder using Function

### C Program to Find Volume and Surface Area of Cylinder using Standard Formula

```/* C Program to find Volume and Surface Area of a Cylinder */
#include<stdio.h>
#include<math.h>
int main()
{
// L = Lateral Surface Area of a Cylinder, T = Top Surface Area
float sa,Volume, L, T;
printf("\n Please Enter the radius and height of a cylinder :- ");
L = 2 * M_PI * radius * height;
printf("\n Surface Area of a cylinder = %.2f", sa);
printf("\n Volume of a Cylinder = %.2f", Volume);
printf("\n Lateral Surface Area of a cylinder = %.2f", L);
printf("\n Top OR Bottom Surface Area of a cylinder = %.2f", T);

return 0;
}```

The result of the above c program; as follows:

```Please Enter the radius and height of a cylinder :- 10 15
Surface Area of a cylinder = 1570.80
Volume of a Cylinder = 4712.39
Lateral Surface Area of a cylinder = 942.48
Top OR Bottom Surface Area of a cylinder = 314.16```

### C Program to Find Volume and Surface Area of Cylinder using Function

```#include <stdio.h>
#include<math.h>
{
// L = Lateral Surface Area of a Cylinder, T = Top Surface Area
float sa,Volume, L, T;
L = 2 * M_PI * radius * height;
printf("\n Surface Area of a cylinder = %.2f", sa);
printf("\n Volume of a Cylinder = %.2f", Volume);
printf("\n Lateral Surface Area of a cylinder = %.2f", L);
printf("\n Top OR Bottom Surface Area of a cylinder = %.2f", T);
}
int main()
{

printf("\n Please Enter the radius and height of a cylinder :- ");
return 0;
}```

The result of the above c program; as follows:

```Please Enter the radius and height of a cylinder :- 10 15
Surface Area of a cylinder = 1570.80
Volume of a Cylinder = 4712.39
Lateral Surface Area of a cylinder = 942.48
Top OR Bottom Surface Area of a cylinder = 314.16

```

Categories C