Browse Source

refactoring 3: Ausgabe in for-Schleife versetzt und Variable außerhalb Funktion initialisiert

remotes/origin/Christian
Christian Reum 11 months ago
parent
commit
58a91c2766
  1. 2
      src/wwm.c

2
src/wwm.c

@ -6,6 +6,7 @@
int runde = 0;
int geld = 0;
int frage = 0;
int useranswer;
void wwm(){
printf("Welcome to ´Who wants to be a millionaire?´ \n");
@ -33,6 +34,7 @@ void wwm(){
for (r = 1; r <= 15; r++){
printf("You are at stage %d and have %d $\n", runde, geld);
srand(time(0));
int frage = rand() % 5;
printf("Question %d: %s\n", runde + 1, question[frage]);

Loading…
Cancel
Save