|
@ -73,13 +73,13 @@ void wrong(int score1){ |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void fifty_fifty(int question_num) { |
|
|
void fifty_fifty(int question_num) { |
|
|
char qC[][100] = {//6 |
|
|
|
|
|
|
|
|
char qC[][100] = { |
|
|
"A.Mount Everest\nB.Uludag", |
|
|
"A.Mount Everest\nB.Uludag", |
|
|
}; |
|
|
}; |
|
|
printf("%s\n",qC[question_num]); |
|
|
printf("%s\n",qC[question_num]); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void looping(char qS[][100], char qC[][100], char aS[]){// 5 |
|
|
|
|
|
|
|
|
void looping(char qS[][100], char qC[][100], char aS[]){ |
|
|
|
|
|
|
|
|
int k = 0; |
|
|
int k = 0; |
|
|
while(k < 1){ |
|
|
while(k < 1){ |
|
@ -148,6 +148,43 @@ int k = 0; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (score < 1) { |
|
|
|
|
|
printf("You lost! Better luck next time\n"); |
|
|
|
|
|
break; |
|
|
|
|
|
} else { |
|
|
|
|
|
printf("\t\t--------------------Round 3-------------------\n\n"); |
|
|
|
|
|
printf(">>In this round you need to answer 2 questions correctly to move to Round 4<<\n\n"); |
|
|
|
|
|
char response; |
|
|
|
|
|
for (int i = 0; i < 1; i++) { |
|
|
|
|
|
printf("%s\n", qS[i]); |
|
|
|
|
|
printf("%s\n", qC[i]); |
|
|
|
|
|
printf("Enter your answer (A, B, C, or D) or use a lifeline (F for 50/50, H for hint): "); |
|
|
|
|
|
scanf(" %c", &response); |
|
|
|
|
|
response = toupper(response); |
|
|
|
|
|
if (response == 'F') { |
|
|
|
|
|
fifty_fifty(i); |
|
|
|
|
|
printf("Enter your answer (A, B, C, or D): "); |
|
|
|
|
|
scanf(" %c", &response); |
|
|
|
|
|
response = toupper(response); |
|
|
|
|
|
} else if (response == 'H') { |
|
|
|
|
|
hint(i); |
|
|
|
|
|
printf("Enter your answer (A, B, C, or D): "); |
|
|
|
|
|
scanf(" %c", &response); |
|
|
|
|
|
response = toupper(response); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (response == aS[i]) { |
|
|
|
|
|
score++; |
|
|
|
|
|
correct(score); |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
wrong(score); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
k++; |
|
|
k++; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -155,7 +192,7 @@ int k = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void ask_questions(void) { |
|
|
void ask_questions(void) { |
|
|
char qS[][100] = { //5 |
|
|
|
|
|
|
|
|
char qS[][100] = { |
|
|
"What is the name of the tallest mountain in the world?\n" |
|
|
"What is the name of the tallest mountain in the world?\n" |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -176,7 +213,7 @@ void ask_questions(void) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void hint(int question_num) { |
|
|
void hint(int question_num) { |
|
|
char qC[][100] = {//6 |
|
|
|
|
|
|
|
|
char qC[][100] = { |
|
|
"The Tallest mountain is 8,849m." |
|
|
"The Tallest mountain is 8,849m." |
|
|
}; |
|
|
}; |
|
|
printf("%s\n",qC[question_num]); |
|
|
printf("%s\n",qC[question_num]); |
|
|