Thursday, July 28, 2011

Find the Area, Perimeter of a rectangle

#include<stdio.h>
void main()

{
int length,breadth,area,perimetre;
clrscr();
printf("Enter length and breadth of the rectangle : ");
scanf("%d%d",&length,&breadth);
area=length*breadth;
perimetre=2*(length+breadth);
printf("\nArea of the rectangle = %d",area);
printf("\nPerimetre of the rectangle = %d",perimetre);
getch();
}

0 comments:

Post a Comment