|
|
@ -8,12 +8,19 @@ int generateRandomNumber(int min, int max) { |
|
|
|
return rand() % (max - min + 1) + min; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int getUserAnswer() { |
|
|
|
int userAnswer; |
|
|
|
scanf("%d", &userAnswer); |
|
|
|
return userAnswer; |
|
|
|
} |
|
|
|
|
|
|
|
void printQuestion(int num1, int num2, int round) { |
|
|
|
printf("\n--- Frage %d ---\n", round); |
|
|
|
printf("%d + %d = ?", num1, num2); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Funktion zum Durchführen des Mathematikspiels |
|
|
|
void runMathGame(int rounds) { |
|
|
|