C Program to Calculate Area of Rectangle

 


C Program to Calculate Area of Rectangle




/*********************************************************************
C Program to calculate area of rectangle
area=l*b
********************************************************************/
#include<stdio.h>
#include<conio.h>
void main()
{
float l,b,area;

clrscr();
printf("Enter length and breadth to calculate area of rectangle\n");
scanf("%f%f",&l,&b);
area=l*b;
printf("The area of rectangle is:\t%f\n",area);
printf("End of program");
}


Enter length and breadth to calculate area of rectangle

2 3

The area of rectangle is: 6.000000

End of program




/*********************************************************************
C Program to calculate area of rectangle
area=l*b
********************************************************************/
#include<stdio.h>
#include<conio.h>
void main()
{
float l,b,area;

clrscr();
printf("Enter length and breadth to calculate area of rectangle\n");
scanf("%f%f",&l,&b);
// area=l*b;
printf("The area of rectangle is:\t%f\n",l*b);
printf("End of program");
}


Enter length and breadth to calculate area of rectangle

3 2

The area of rectangle is: 6.000000

End of program


टिप्पणी पोस्ट करा

0 टिप्पण्या