Write a program to calculate area off rectangle
//Calculate area of rectangle
#include<stdio.h>
#include<conio.h>
void main()
{
int l,w,rectangle;
printf("\n Enter a Length=");
scanf("%d",&l);
printf("\n Enter a Width=");
scanf("%d",&w);
rectangle=l*w;
printf("\n Area Of Rectangle=%d",rectangle);
//Second method
printf("\n Area of Rectangle=%d",l*w);
getch();
}
Enter a Length=2
Enter a Width=3
Area Of Rectangle=6
Area of Rectangle=6
0 Comments