-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1043URI.c
48 lines (35 loc) · 842 Bytes
/
1043URI.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <stdio.h>
int main()
{
float a =0 , b=0, c=0, d=0;
scanf("%f%f%f",&a,&b,&c);
if ((a+b)<= c && a>=b){
d=(a+b)*.5*c;
printf("Area = %.1f\n",d);
}
else if( (a+b)<= c && a<=b){
d=(a+b)*.5*c;
printf("Area = %.1f\n",d);
}
else if( (a+c)<= b && a<=c){
d=(a+b)*.5*c;
printf("Area = %.1f\n",d);
}
else if( (a+c)<= b && a>=c){
d=(a+b)*.5*c;
printf("Area = %.1f\n",d);
}
else if ((b+c)<= a && b<=c){
d=(a+b)*.5*c;
printf("Area = %.1f\n",d);
}
else if ((b+c)<= a && b>=c){
d=(a+b)*.5*c;
printf("Area = %.1f\n",d);
}
else {
d=a+b+c;
printf("Perimetro = %.1f\n",d);
}
return 0;
}