VOOZH about

URL: https://www.geeksforgeeks.org/c/c-program-to-find-area-and-perimeter-of-rectangle/

⇱ C Program To Find Area And Perimeter of Rectangle - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

C Program To Find Area And Perimeter of Rectangle

Last Updated : 16 Sep, 2022

Here, we will find the area and perimeter of rectangle using a C Program as follows:

Example: 

Input:

l = 10 
b = 10 

Output: 

area = 100 
perimeter = 40 

Explanation: 

The formula for the area of a rectangle is 

Area = length*breadth => l*b 

The formula for the perimeter of a rectangle is 

Perimeter = 2*(length + breadth) => 2*(l+b) 

Method 1: 


Output
Area of rectangle is : 100
Perimeter of rectangle is : 40

Method 2: 


Output
Area of rectangle is : 100
Perimeter of rectangle is : 40

Method 3: Using functions 


Output
Area of rectangle is : 100
Perimeter of rectangle is : 40
Comment
Article Tags: