Browse Source

refactoring: funktion minuten

remotes/origin/ageinsecondsdev
fdai7754 11 months ago
parent
commit
5917512bd4
  1. 7
      src/ageinseconds.c

7
src/ageinseconds.c

@ -6,6 +6,11 @@ int sekunden(int jahre) {
return erg; return erg;
} }
int minuten(int jahre) {
int erg = jahre * 525600;
return erg;
}
int run_ageinseconds() { int run_ageinseconds() {
int age; int age;
@ -14,7 +19,7 @@ int run_ageinseconds() {
printf("-------------------------------------------------"); printf("-------------------------------------------------");
printf("\nDu bist: %d Sekunden alt", sekunden(age)); printf("\nDu bist: %d Sekunden alt", sekunden(age));
printf("\n-------------------------------------------------"); printf("\n-------------------------------------------------");
printf("\nDas sind %d in Minuten und %d in Stunden", age * 365 * 24 * 60, age * 365 * 24);
printf("\nDas sind %d in Minuten und %d in Stunden", minuten(age), age * 365 * 24);
printf("\n-------------------------------------------------"); printf("\n-------------------------------------------------");
return 0; return 0;
} }
Loading…
Cancel
Save