Browse Source

Switch erstellt um eingabe der Antwort auszuwerten

remotes/origin/Florian
Florian Baeseler 11 months ago
parent
commit
95e648dd95
  1. 2
      build/test/results/test_casualQuiz.pass
  2. 2
      build/test/results/test_quizduell.pass
  3. 2
      build/test/results/test_timequiz.pass
  4. 2
      build/test/results/test_wwm.pass
  5. 28
      src/casualQuiz.c

2
build/test/results/test_casualQuiz.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.015329999994719401
:time: 0.013744500000029802

2
build/test/results/test_quizduell.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.014142300002276897
:time: 0.01369590000831522

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.013569900009315461
:time: 0.012676399986958131

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.013188799988711253
:time: 0.013807800016365945

28
src/casualQuiz.c

@ -23,13 +23,35 @@ void casualQuiz() {
return;
}
void activePlaying(char *fragen[], char *antworten[], int richtige_antwort[], int size ){
int eingabeInt;
int eingabe;
for (int i = 0; i < size; i++){
eingabeInt = 5;
eingabe = 5;
FzeigeFragen(fragen, i);
FzeigeAntworten(antworten, i);
printf("Please type in your answer 1,2,3 or 4: ");
eingabe = FEingabeInteger();
switch(eingabe){
case 1:{
printf("Case 1");
break;
}
case 2:{
printf("Case 2");
break;
}
case 3:{
printf("Case 3");
break;
}
case 4:{
printf("Case 4");
break;
}
default:{
printf("Default");
break;
}
}
printf(" %d\n", richtige_antwort[i]);
}
}

Loading…
Cancel
Save