#include<stdio.h>
#include<conio.h>
float Rect(float l, float b)
{
return(l*b);
}
float Tri(float b, float h)
{
return (0.5*b*h);
}
float Cir(float r)
{
return(3.14*r*r);
}
float Sqr(float s)
{
return (s*s);
}
int main()
{
float length, breadth,side, radius,base,height;
float A1,A2,A3,A4;
clrscr();
printf("Enter length of Rectangle:");
scanf("%f",&length);
printf("Enter breadth of Rectangle:");
scanf("%f",&breadth);
A1=Rect(length,breadth);
printf("Area of Rectangle is:%.2fm²",A1);
printf("\n\nEnter base of Triangle:");
scanf("%f",&base);
printf("Enter height of Triangle:");
scanf("%f",&height);
A2=Tri(base,height);
printf("Area of Triangle is:%.2fm²",A2);
printf("\n\nEnter radius of Circle:");
scanf("%f",&radius);
A3=Cir(radius);
printf("Area of Circle is:%.2fm²",A3);
printf("\n\nEnter side of Square:");
scanf("%f",&side);
A4=Sqr(side);
printf("Area of Square is:%fm²",A4);
return 0;
}
***Input && Output***
0 Comments