Computer Science, asked by Sahilrihan7874, 1 month ago

Write a program to find area & perimeter of the rectangle

Answers

Answered by 2611velunaachi
0

Answer:

The perimeter of a Rectangle-P= 2(l + b)

Area of a Rectangle- A = l × b

Explanation:

Answered by MrTSR
0

C Program to find area & perimeter of the rectangle

#include<stdio.h>

int main(){

   int length, breadth, perimeter;

   printf("Enter the length of the rectangle: \n");

   scanf("%d", &length);

   printf("Enter the breadth of the rectangle: \n");

   scanf("%d", &breadth);

   printf("The area of the rectangle is : %d \n", length*breadth);

   printf("Perimeter of the Rectangle : %d", 2*(length+breadth));

   return 0;

}

EXAMPLE OUTPUT

Enter the length of the rectangle: 5

Enter the breadth of the rectangle: 10

The area of the rectangle is : 50

The perimeter of the rectangle is : 30

Program has been run in the above attachment.

Attachments:
Similar questions