Write a program to calculate area of rectangle

 Write a program to calculate area off rectangle

Write a program to calculate area of 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();
}









OUTPUT:-
Enter a Length=2 Enter a Width=3 Area Of Rectangle=6 Area of Rectangle=6



















Related Program (Please Check)

1. Basic Question All





Post a Comment

0 Comments