Browse Source

Ungueltige Wetteinsaetze werden abgefangen

remotes/origin/dev
fdai7472 11 months ago
parent
commit
6b9011afcb
  1. 14
      src/main/c/Stefan/slot_machine.c

14
src/main/c/Stefan/slot_machine.c

@ -34,11 +34,17 @@ int userInput(){
}
int getBet(int balance){
int bet;
printf("Wetteinsatz: ");
bet = userInput();
return bet;
while(1){
printf("Wetteinsatz: ");
int bet = userInput();
if(bet <= balance && bet >= 0){
return bet;
} else {
printf("Ungueltige Eingabe!\n");
}
}
}
void welcomeMessage(){

Loading…
Cancel
Save