An algorithm to find the area and perimeter of rectangle.

  1. START
  2. Input Length of Rectangle as L
  3. Input Bredth of Rectangle as B
  4. Calculate Area= L * B
  5. Calculate Circumference Perimeter = 2 * ( L+ B)
  6. Print Value of Area and Perimeter
  7. END / STOP

Flowchart to find the area and perimeter of rectangle.

Flowchart for area for rectangle
Flowchart for area for rectangle.

C-code to find the area and perimeter of rectangle.

#include<stdio.h>
void main()
{
int  l,b,area,peri;
printf("Enter Length of rectangle :  ");
scanf("%d",&l);
printf("Enter Bredth of  rectangle :  ");
scanf("%d",&b);
area= l * b;
peri= 2* ( l + b);
printf("\n The Area of rectangle is  : %d and perimeter is : %d ", area, peri);
}