|
|
@ -25,13 +25,12 @@ void casualQuiz() { |
|
|
|
int *answeredP = &answered; |
|
|
|
|
|
|
|
activePlaying(easy_fragen, *easy_antworten, easy_richtigeAntworten, length_frag_array, answeredP, correctP); |
|
|
|
printf("%d", answered); |
|
|
|
printf("korrekte Antworten: %d\n", correct); |
|
|
|
printf("bei: %d beantworteten Fragen", answered); |
|
|
|
return; |
|
|
|
} |
|
|
|
void activePlaying(char* fragen[], char* antworten[], int richtige_antwort[], int size, int* answeredP, int* correctP) { |
|
|
|
int eingabe; |
|
|
|
int plus = *answeredP + 1; |
|
|
|
*answeredP = plus; |
|
|
|
bool richtig; |
|
|
|
for (int i = 0; i < size; i++) { |
|
|
|
eingabe = 5; |
|
|
@ -41,6 +40,16 @@ void activePlaying(char* fragen[], char* antworten[], int richtige_antwort[], in |
|
|
|
printf("Please type in your answer 1,2,3 or 4: "); |
|
|
|
eingabe = FEingabeInteger(); |
|
|
|
richtig = FcheckaufRichtigkeit(eingabe, richtige_antwort, i); |
|
|
|
if (richtig == true){ |
|
|
|
int plus = *answeredP + 1; |
|
|
|
*answeredP = plus; |
|
|
|
int add = *correctP + 1; |
|
|
|
*correctP = add; |
|
|
|
} |
|
|
|
else{ |
|
|
|
int plus = *answeredP + 1; |
|
|
|
*answeredP = plus; |
|
|
|
} |
|
|
|
printf("Bool richtig / falsch: %d\n", richtig); |
|
|
|
printf(" %d\n", richtige_antwort[i]); |
|
|
|
} |
|
|
|