修改文件结构。

This commit is contained in:
unlockable
2023-02-21 10:56:54 +08:00
parent a64cfdd9f3
commit 40182871f4
83 changed files with 0 additions and 0 deletions

42
POP/05/Exercise01.c Normal file
View File

@@ -0,0 +1,42 @@
#include <stdio.h>
void decideShape(int max, int small_1, int small_2) {
if (small_1 + small_2 > max) {
if (small_1 == small_2) {
if (small_1 == max) {
printf("Equilateral triangle");
}
else {
printf("Isosceles triangle");
}
}
else {
printf("Triangle");
}
}
else {
printf("Not a triangle");
}
}
int main() {
int a = 0, b = 0, c = 0;
scanf("%d %d %d", &a, &b, &c);
if (a > c) {
if (a > b) {
decideShape(a, b, c);
}
else {
decideShape(b, a, c);
}
}
else {
if (c > b) {
decideShape(c, a, b);
}
else {
decideShape(b, a, c);
}
}
return 0;
}