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.
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.
- Maximum area of rectangle possible with given perimeter
- 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
- Program to find Perimeter / Circumference of Square and Rectangle
- Program to calculate area and perimeter of Trapezium
- Program to calculate area and perimeter of equilateral triangle
- Program to find the Area and Perimeter of a Semicircle
- 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
- Perimeter and Area of Varignon's Parallelogram
- Area of a Square | Using Side, Diagonal and Perimeter
- Find maximum volume of a cuboid from the given perimeter and area
- Largest subset of rectangles such that no rectangle fit in any other rectangle
- Maximum area rectangle by picking four sides from array
- Area of a triangle inscribed in a rectangle which is inscribed in an ellipse
- Area of the biggest possible rhombus that can be inscribed in a rectangle
- Find minimum area of rectangle with given set of coordinates
- Number of squares of maximum area in a rectangle
- Area of Largest rectangle that can be inscribed in an Ellipse
- Area of largest triangle that can be inscribed within a rectangle
Improved By : vt_m