Browse Source

refactoring: funktion sekunden

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

7
src/ageinseconds.c

@ -1,13 +1,18 @@
#include <stdio.h>
#include "ageinseconds.h"
int sekunden(int jahre) {
int erg = jahre * 31536000;
return erg;
}
int run_ageinseconds() {
int age;
printf("Dein Alter: ");
scanf("%d", &age);
printf("-------------------------------------------------");
printf("\nDu bist: %d Sekunden alt", age * 365 * 24 * 60 * 60);
printf("\nDu bist: %d Sekunden alt", sekunden(age));
printf("\n-------------------------------------------------");
printf("\nDas sind %d in Minuten und %d in Stunden", age * 365 * 24 * 60, age * 365 * 24);
printf("\n-------------------------------------------------");

Loading…
Cancel
Save