diff --git a/src/magiceightball.c b/src/magiceightball.c index e69de29..e8fc495 100644 --- a/src/magiceightball.c +++ b/src/magiceightball.c @@ -0,0 +1,27 @@ +#include +#include +#include + +int run_magiceightball() { + + srand(time(NULL)); + + char antwort[6][100] = { + "Ja", + "Nein", + "Vielleicht", + "Zweifelsfrei", + "Bitte nicht", + "Das trifft zu", + }; + + printf("Frage: "); + + char fragesatz[100]; + fgets(fragesatz, sizeof(fragesatz), stdin); + + int randomIndex = rand() % 6; + printf("%s\n", antwort[randomIndex]); + + return 0; +} \ No newline at end of file