Given two integers **P** and **Q** which represents the percentage change in the **length and breadth of the rectangle**, the task is to print the percentage change in the area of the rectangle.

**Examples:**

Input:P = 10, Q = 20

Output:32

Explanation:

Let the initial length of the rectangle be 100 and breadth be 80.

Initial area = 8000.

New length = 110 and new breadth = 96. Therefore, the new area = 10560.

The percentage change in the area = ((10560 – 8000) / 8000) * 100 = 32.

Input:P = 20, Q = -10

Output:8

Let initial length of the rectangle be 100 and breadth be 80.

Initial area = 8000.

New length = 120 and new breadth = 72. Therefore, new area = 8640.

The percentage change in the area = ((8640 – 8000) / 8000) * 100 = 8.

**Approach:**

- Since the area of the rectangle is given by the formula:
area = length * breadth

- Let the initial length of the rectangle be
**L**and the breadth of the rectangle be**B**. Therefore, the initial area is given by**L * B**. - Therefore, the new length and breadth are given as:
L' = L + ((P/100)*L) B' = B + ((Q/100)*B)

- Therefore, the new length and breadth are given as:

**new area = [L + ((C/100)*L)] * [B + ( ( D / 100) * B)]** - The percentage change in the area is given by the formula:

% change = ((new area – old area) / old area )*100 - Percentage increase in the cylinder if the height is increased by given percentage but radius remains constant
- Percentage increase in volume of the cube if a side of cube is increased by a given percentage
- Percentage increase in volume of the sphere if radius is increased by a given percentage
- Ratio of area of a rectangle with the rectangle inscribed in it
- Maximum area of a Rectangle that can be circumscribed about a given Rectangle of size LxW
- Overall percentage change from successive changes
- Percentage change in Hemisphere volume if radius is changed
- Python | Percentage increase in the total surface area of the cuboid
- Largest subset of rectangles such that no rectangle fit in any other rectangle
- Find minimum area of rectangle with given set of coordinates
- Maximum area rectangle by picking four sides from array
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse
- Program for Area And Perimeter Of Rectangle
- Area of the biggest possible rhombus that can be inscribed in a rectangle
- Number of squares of maximum area in a rectangle
- Area and Perimeter of Rectangle in PL/SQL
- Sum of Area of all possible square inside a rectangle
- Area of Largest rectangle that can be inscribed in an Ellipse
- Area of largest triangle that can be inscribed within a rectangle
- Rectangle with Maximum Area using Java Pair

Below is the implementation of the above approach:

## C++

`// CPP implementation to find the percentage ` `#include <bits/stdc++.h> ` `using` `namespace` `std; ` ` ` `// change in the area when the percentage change ` `// in the length and breadth is given ` ` ` `// Function to calculate percentage ` `// change in area of rectangle ` `int` `calculate_change(` `int` `length, ` `int` `breadth){ ` ` ` `int` `change = 0; ` ` ` `change = length + breadth+((length * breadth)/100); ` ` ` `return` `change; ` ` ` `} ` ` ` `// Driver code ` `int` `main() ` `{ ` ` ` `int` `cL = 20; ` ` ` `int` `cB = -10; ` ` ` `int` `cA = calculate_change(cL, cB); ` ` ` ` ` `printf` `(` `"%d"` `,cA); ` ` ` `return` `0; ` `} ` |

*chevron_right*

*filter_none*

## Java

`// Java implementation to find the percentage ` `import` `java.util.*; ` ` ` `class` `GFG{ ` ` ` ` ` `// change in the area when the percentage change ` ` ` `// in the length and breadth is given ` ` ` ` ` `// Function to calculate percentage ` ` ` `// change in area of rectangle ` ` ` `static` `int` `calculate_change(` `int` `length, ` `int` `breadth){ ` ` ` `int` `change = ` `0` `; ` ` ` `change = length + breadth+((length * breadth)/` `100` `); ` ` ` `return` `change; ` ` ` `} ` ` ` ` ` `// Driver code ` ` ` `public` `static` `void` `main(String args[]) ` ` ` `{ ` ` ` `int` `cL = ` `20` `; ` ` ` `int` `cB = -` `10` `; ` ` ` `int` `cA = calculate_change(cL, cB); ` ` ` ` ` `System.out.println(+ cA); ` ` ` ` ` `} ` `} ` ` ` `// This code is contributed by AbhiThakur ` ` ` |

*chevron_right*

*filter_none*

## Python3

`# Python3 implementation to find the percentage ` `# change in the area when the percentage change ` `# in the length and breadth is given ` ` ` `# Function to calculate percentage ` `# change in area of rectangle ` `def` `calculate_change(length, breadth): ` ` ` `change ` `=` `0` ` ` `change ` `=` `length ` `+` `breadth` `+` `((length ` `*` `breadth)` `/` `/` `100` `) ` ` ` `return` `change ` ` ` `# Driver code ` `if` `__name__ ` `=` `=` `"__main__"` `: ` ` ` `cL ` `=` `20` ` ` `cB ` `=` `-` `10` ` ` `cA ` `=` `calculate_change(cL, cB) ` ` ` ` ` `print` `(cA) ` ` ` `# This code is contributed by mohit kumar 29 ` |

*chevron_right*

*filter_none*

## C#

`// C# implementation to find the percentage ` `using` `System; ` `using` `System.Collections.Generic; ` `using` `System.Linq; ` ` ` `class` `GFG ` `{ ` ` ` `// change in the area when the percentage change ` `// in the length and breadth is given ` ` ` `// Function to calculate percentage ` `// change in area of rectangle ` `static` `int` `calculate_change(` `int` `length, ` `int` `breadth){ ` ` ` `int` `change = 0; ` ` ` `change = length + breadth + ((length * breadth)/100); ` ` ` `return` `change; ` `} ` ` ` `// Driver Code ` `public` `static` `void` `Main(String[] args) ` `{ ` ` ` `int` `cL = 20; ` ` ` `int` `cB = -10; ` ` ` `int` `cA = calculate_change(cL, cB); ` ` ` ` ` `Console.Write(cA); ` `} ` `} ` ` ` `// This code is contributed by shivanisinghss2110 ` |

*chevron_right*

*filter_none*

**Output:**

8

**Time Complexity:** O(1)

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the **DSA Self Paced Course** at a student-friendly price and become industry ready.

## Recommended Posts:

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.