Browse Source

getBalance() added

remotes/origin/dev
fdai7472 11 months ago
parent
commit
8b185a3cdc
  1. 8
      src/main/c/Stefan/slot_machine.c
  2. 2
      src/main/c/Stefan/slot_machine.h

8
src/main/c/Stefan/slot_machine.c

@ -5,12 +5,20 @@ void slotMachine(){
welcomeMessage(); welcomeMessage();
int balance = getBalance();
}
int getBalance(){
int balance;
printf("Guthaben einwerfen: ");
scanf_s("%d", &balance);
return balance;
} }
void welcomeMessage(){ void welcomeMessage(){

2
src/main/c/Stefan/slot_machine.h

@ -3,5 +3,7 @@
void slotMachine(); void slotMachine();
void welcomeMessage(); void welcomeMessage();
int getBalance();
#endif // SLOT_MACHINE_H #endif // SLOT_MACHINE_H
Loading…
Cancel
Save