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 firstname.lastname@example.org. 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.
- 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 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
- Area of the biggest possible rhombus that can be inscribed in a rectangle
- Area of the biggest ellipse inscribed within a rectangle
Improved By : vt_m