Browse Source

functional 21 (vorheriger 20): if Anweisung runden 1-5

remotes/origin/Christian
Christian Reum 11 months ago
parent
commit
b186a85ab0
  1. 39
      src/wwm.c

39
src/wwm.c

@ -102,6 +102,10 @@ void wwm(){
{"Au", "Ag", "Su", "Si"}
};
int correctAnswer2[] = {
1, 3, 4, 2, 2
};
for (int r = 1; r <= 16; r++){
if (r == 16) {
@ -109,27 +113,28 @@ void wwm(){
return;
}
if (r <= 5) {
printf("__________________________________________________ \n\n");
printf("You are at stage %d and have %d $\n", runde, geld);
crandomNumber();
printf("Question %d: %s\n", runde + 1, question[frage]);
printf("__________________________________________________ \n\n");
printf("You are at stage %d and have %d $\n", runde, geld);
crandomNumber();
printf("Question %d: %s\n", runde + 1, question[frage]);
for (int i = 0; i < 4; i++) {
printf("%d. %s \n", i + 1, answers[frage][i]);
}
for (int i = 0; i < 4; i++) {
printf("%d. %s \n", i + 1, answers[frage][i]);
}
ceingabe();
ceingabe();
if (useranswer == correctAnswer[frage]) {
printf("That is correct!\n");
runde++;
setGeld(runde);
}
else {
printf("That is a shame! That is wrong!\n You lost %d $", geld);
return;
if (useranswer == correctAnswer[frage]) {
printf("That is correct!\n");
runde++;
setGeld(runde);
}
else {
printf("That is a shame! That is wrong!\n You lost %d $", geld);
return;
}
}
}
}
Loading…
Cancel
Save