• Tutorials
  • DSA
  • Data Science
  • Web Tech
  • Courses
July 21, 2022 |1.1K Views

C Program for Area And Perimeter Of Rectangle

Description
Discussion

In this video, we will see how to find Area & Perimeter of Rectangle in C Language.

Formulae to find Area and Perimeter of Rectangle
1) Area of rectangle l * b
2) The perimeter of rectangle 2*(l+b)

For examples:
Input:
l=3, b=4

Output:
Area = 12
Perimeter = 14

Input:
l=3, b=7

Output:
Area = 21
Perimeter = 2

Here, we calculate the Area & Perimeter of the Rectangle using simple math formula. Apart from that, we will see the time and space complexity of this approach.

C Program for Area And Perimeter Of Rectangle : https://www.geeksforgeeks.org/c-program-to-find-area-and-perimeter-of-rectangle/