|
@ -31,6 +31,10 @@ void ccheckAnswer(int useranswer) { |
|
|
printf("Congratulations! You have won %d $!", geld); |
|
|
printf("Congratulations! You have won %d $!", geld); |
|
|
exit(0); |
|
|
exit(0); |
|
|
} |
|
|
} |
|
|
|
|
|
if (useranswer < 1 || useranswer > 4) { |
|
|
|
|
|
printf("Please enter a number beetween 1 and 4 or enter 5 to end the game!\n"); |
|
|
|
|
|
ceingabe(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
int ceingabe() { |
|
|
int ceingabe() { |
|
@ -40,7 +44,8 @@ int ceingabe() { |
|
|
printf("Please enter a number beetween 1 and 4 to answer or 5 to end the game!\n"); |
|
|
printf("Please enter a number beetween 1 and 4 to answer or 5 to end the game!\n"); |
|
|
while (getchar() != '\n') |
|
|
while (getchar() != '\n') |
|
|
return ceingabe(); |
|
|
return ceingabe(); |
|
|
return useranswer; |
|
|
|
|
|
|
|
|
ccheckAnswer(useranswer); |
|
|
|
|
|
return useranswer; |
|
|
} |
|
|
} |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|