You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
printf("Enter the length & breadth of rectangle :\n");
18
+
scanf("%f %f", &l, &b);
19
+
area=l*b;
20
+
printf("Area of rectangle = %f",area);
21
+
return(area);
22
+
}
23
+
24
+
inttrg()
25
+
{
26
+
floata, b, c, s, area;
27
+
printf("Enter the length of three sides of triangle :\n");
28
+
scanf("%f %f %f", &a, &b, &c);
29
+
s=(a+b+c)/2;
30
+
area=sqrt(s*(s-a)*(s-b)*(s-c));
31
+
printf("Area of triangle = %f", area);
32
+
return(area);
33
+
}
34
+
35
+
intcir()
36
+
{
37
+
floatr, area, pi=3.14;
38
+
printf("Enter the radius of circle : ");
39
+
scanf("%f",&r);
40
+
area=pi*r*r;
41
+
printf("Area of circle = %f",area);
42
+
return(area);
43
+
}
44
+
intmain()
45
+
{
46
+
intchoice;
47
+
printf("Enter 1 if you want to calculate are of square\nEnter 2 if you want to calculate are of rectangle\nEnter 3 if you want to calculate are of triangle\nEnter 4 if you want to calculate are of circle\n ");
0 commit comments