Browse Source

functional 10: Implementierung Geldbeträge iund steigen mit Runde

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

10
src/wwm.c

@ -8,9 +8,16 @@ int geld = 0;
int frage = 0;
int useranswer;
int setGeld(int runde){
int Geldstufen[] = {0, 100, 200, 300, 500, 1000, 2000, 4000, 8000, 16000, 32000, 64000, 125000, 250000, 500000, 1000000};
geld = Geldstufen[runde];
return geld;
}
void wwm(){
printf("Welcome to ´Who wants to be a millionaire?´ \n");
printf("You are at stage %d and have %d $\n", runde, geld);
const char* question[] = {
"Which planet is known as the `blue planet`?",
@ -50,6 +57,7 @@ void wwm(){
if (useranswer == correctAnswer[frage]) {
printf("That is correct!\n");
runde++;
setGeld(runde);
}
else {
printf("What a shame! That is wrong!\n");

Loading…
Cancel
Save