A rectangle is a flat figure in a plane.It has four sides and four equal angles of 90 degree each.In rectangle all four sides are not of equal length like square, sides opposite to each other have equal length.Both diagonals of rectangle have equal length.
Input : 4 5 Output : Area = 20 Perimeter = 18 Input : 2 3 Output : Area = 6 Perimeter = 10
Area of rectangle : a*b Perimeter of ractangle: 2*(a + b)
Area = 30 Perimeter = 22
This article is contributed by Saloni Gupta. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
GeeksforGeeks has prepared a complete interview preparation course with premium videos, theory, practice problems, TA support and many more features. Please refer Placement 100 for details
- Maximum area of rectangle possible with given perimeter
- Program to find Perimeter / Circumference of Square and Rectangle
- Program to calculate area and perimeter of Trapezium
- Program to find the Area and Perimeter of a Semicircle
- Program to calculate area and perimeter of equilateral triangle
- 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
- Ratio of area of a rectangle with the rectangle inscribed in it
- Perimeter and Area of Varignon's Parallelogram
- Find maximum volume of a cuboid from the given perimeter and area
- Area of the largest Rectangle without a given point
- Area of largest triangle that can be inscribed within a rectangle
- Find the percentage change in the area of a Rectangle
- Area of the biggest ellipse inscribed within a rectangle
- Find minimum area of rectangle with given set of coordinates
Improved By : vt_m