Given diameter and height, find the perimeter of a cylinder.
Perimeter is the length of the outline of a two – dimensional shape. A cylinder is a three – dimensional shape. So, technically we cannot find the perimeter of a cylinder but we can find the perimeter of the cross-section of the cylinder. This can be done by creating the projection on its base, thus, creating the projection on its side, then the shape would be reduced to a rectangle.

Formula :
Perimeter of cylinder ( P ) = ![]()
here d is the diameter of the cylinder
h is the height of the cylinder
Examples :
Input : diameter = 5, height = 10 Output : Perimeter = 30 Input : diameter = 50, height = 150 Output : Perimeter = 400
Java
// Java program to find // perimeter of cylinder import java.io.*; class GFG { // Function to calculate perimeter static int perimeter(int diameter, int height) { return 2 * (diameter + height); } /* Driver program to test above function */ public static void main(String[] args) { int diameter = 5; int height = 10; System.out.println("Perimeter = " + perimeter(diameter, height) + " units\n"); } } // This code is contributed by Gitanjali. |
chevron_right
filter_none
Output :
Perimeter = 30 units
Please refer complete article on Find the perimeter of a cylinder for more details!
Recommended Posts:
- C Program for Find the perimeter of a cylinder
- Python Program for Find the perimeter of a cylinder
- Find the perimeter of a cylinder
- Program to find Perimeter / Circumference of Square and Rectangle
- Program to find the Area and Perimeter of a Semicircle
- Program to find the Perimeter of a Regular Polygon
- Calculate Volume, Curved Surface Area and Total Surface Area Of Cylinder
- JavaFX | Cylinder with examples
- Largest cube that can be inscribed within a right circular cylinder
- Largest right circular cylinder that can be inscribed within a cone
- Program for Area And Perimeter Of Rectangle
- Program to calculate area and perimeter of Trapezium
- Program to calculate area and perimeter of equilateral triangle
- Program to Calculate the Perimeter of a Decagon
- Program to calculate area and perimeter of a rhombus whose diagonals are given
- Program to calculate the Area and Perimeter of Incircle of an Equilateral Triangle
- Find maximum volume of a cuboid from the given perimeter and area
- Maximum area of rectangle possible with given perimeter
- Perimeter and Area of Varignon's Parallelogram
- Area of a Square | Using Side, Diagonal and Perimeter

