diff --git a/src/ageinseconds.c b/src/ageinseconds.c index 6d00ff7..4bc3512 100644 --- a/src/ageinseconds.c +++ b/src/ageinseconds.c @@ -35,31 +35,31 @@ int tierfakten(int age) { printf("%s", fakt[0]); } - if (age <= 6 && age > 4) { + else if (age <= 6 && age > 4) { printf("%s", fakt[1]); } - if (age <= 14 && age > 6) { + else if (age <= 14 && age > 6) { printf("%s", fakt[2]); } - if (age <= 20 && age > 14) { + else if (age <= 20 && age > 14) { printf("%s", fakt[3]); } - if (age <= 29 && age > 20) { + else if (age <= 29 && age > 20) { printf("%s", fakt[4]); } - if (age <= 47 && age > 29) { + else if (age <= 47 && age > 29) { printf("%s", fakt[5]); } - if (age <= 95 && age > 47) { + else if (age <= 95 && age > 47) { printf("%s", fakt[6]); } - if (age > 95) { + else { printf("%s", fakt[7]); }