# Percentage increase in the cylinder if the height is increased by given percentage but radius remains constant

Given here is a right circular cylinder, whose height increases by a given percentage, but radius remains constant. The task is to find the percentage increase in the volume of the cylinder.

**Examples:**

Input:x = 10Output:10%Input:x = 18.5Output:18.5%

**Approach**:

- Let, the radius of the cylinder =
**r** - height of the cylinder =
**h** - given percentage increase =
**x%** - so, old volume =
**π*r^2*h** - new height =
**h + hx/100** - new volume =
**π*r^2*(h + hx/100)** - so, increase in volume =
**πr^2*(hx/100)** - so percentage increase in volume =
**(πr^2*(hx/100))/(πr^2*(hx/100))*100**=**x**

## C++

`// C++ program to find percentage increase ` `// in the cylinder if the height ` `// is increased by given percentage ` `// but radius remains constant ` ` ` `#include <bits/stdc++.h> ` `using` `namespace` `std; ` ` ` `void` `newvol(` `double` `x) ` `{ ` ` ` `cout << ` `"percentage increase "` ` ` `<< ` `"in the volume of the cylinder is "` ` ` `<< x << ` `"%"` `<< endl; ` `} ` ` ` `// Driver code ` `int` `main() ` `{ ` ` ` `double` `x = 10; ` ` ` `newvol(x); ` ` ` `return` `0; ` `} ` |

*chevron_right*

*filter_none*

## Java

`// Java program to find percentage increase ` `// in the cylinder if the height ` `// is increased by given percentage ` `// but radius remains constant ` `import` `java.io.*; ` ` ` `class` `GFG ` `{ ` ` ` `static` `void` `newvol(` `double` `x) ` `{ ` ` ` `System.out.print( ` `"percentage increase "` ` ` `+ ` `"in the volume of the cylinder is "` ` ` `+ x + ` `"%"` `); ` `} ` ` ` `// Driver code ` `public` `static` `void` `main (String[] args) ` `{ ` ` ` `double` `x = ` `10` `; ` ` ` `newvol(x); ` `} ` `} ` ` ` `// This code is contributed by anuj_67.. ` |

*chevron_right*

*filter_none*

## Python3

`# Python3 program to find percentage increase ` `# in the cylinder if the height ` `# is increased by given percentage ` `# but radius remains constant ` ` ` `def` `newvol(x): ` ` ` `print` `(` `"percentage increase in the volume of the cylinder is "` `,x,` `"%"` `) ` ` ` `# Driver code ` `x ` `=` `10.0` `newvol(x) ` ` ` `# This code is contributed by mohit kumar 29 ` |

*chevron_right*

*filter_none*

## C#

`// C# program to find percentage increase ` `// in the cylinder if the height ` `// is increased by given percentage ` `// but radius remains constant ` `using` `System; ` ` ` `class` `GFG ` `{ ` ` ` `static` `void` `newvol(` `double` `x) ` `{ ` ` ` `Console.WriteLine( ` `"percentage increase "` ` ` `+ ` `"in the volume of the cylinder is "` ` ` `+ x + ` `"%"` `); ` `} ` ` ` `// Driver code ` `public` `static` `void` `Main () ` `{ ` ` ` `double` `x = 10; ` ` ` `newvol(x); ` `} ` `} ` ` ` `// This code is contributed by anuj_67.. ` |

*chevron_right*

*filter_none*

**Output:**

percentage increase in the volume of the cylinder is 10.0%

## Recommended Posts:

- Percentage increase in volume of the sphere if radius is increased by a given percentage
- Percentage increase in the volume of cuboid if length, breadth and height are increased by fixed percentages
- Percentage increase in volume of the cube if a side of cube is increased by a given percentage
- Python | Percentage increase in the total surface area of the cuboid
- Overall percentage change from successive changes
- Program to find the Discount Percentage
- Program to find the percentage of difference between two numbers
- Find Selling Price from given Profit Percentage and Cost
- Program to find the rate percentage from compound interest of consecutive years
- Find cost price from given selling price and profit or loss percentage
- Loss when two items are sold at same price and same percentage profit/loss
- Radius of the circle when the width and height of an arc is given
- Radii of the three tangent circles of equal radius which are inscribed within a circle of given radius
- Find the perimeter of a cylinder
- Maximize a value for a semicircle of given radius

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.