|
|
@ -56,7 +56,15 @@ void e_t_f_printQuestions(char askquestion[][100],char answers[]) { |
|
|
|
printf("[%d]. %s", i + 1, askquestion[i]); |
|
|
|
scanf(" %c", &user_answer); |
|
|
|
user_answer = toupper(user_answer); |
|
|
|
printf(" The answer is: %d\n\n", answers[i]); |
|
|
|
while (user_answer != 'T' || user_answer != 'F' ){ |
|
|
|
if(user_answer == 'T' || user_answer == 'F') { |
|
|
|
break; |
|
|
|
} else { |
|
|
|
printf("Input is invalid! Enter 'T' for true or 'F' for false [T/F]:\n"); |
|
|
|
scanf(" %c", &user_answer); |
|
|
|
user_answer = toupper(user_answer); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
printf("\t\t---------------------------Round2-----------------------------\n"); |
|
|
|
printf("\t\t >>In this round you will be presented with 2 questions.<<\n"); |
|
|
@ -65,7 +73,15 @@ void e_t_f_printQuestions(char askquestion[][100],char answers[]) { |
|
|
|
printf("[%d]. %s", i + 1, askquestion[i]); |
|
|
|
scanf(" %c", &user_answer); |
|
|
|
user_answer = toupper(user_answer); |
|
|
|
printf(" The answer is: %d\n\n", answers[i]); |
|
|
|
while (user_answer != 'T' || user_answer != 'F' ){ |
|
|
|
if(user_answer == 'T' || user_answer == 'F') { |
|
|
|
break; |
|
|
|
} else { |
|
|
|
printf("Input is invalid! Enter 'T' for true or 'F' for false [T/F]:\n"); |
|
|
|
scanf(" %c", &user_answer); |
|
|
|
user_answer = toupper(user_answer); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -94,6 +110,15 @@ void e_ask_questions(void) { |
|
|
|
e_t_f_printQuestions(e_t_f_question, e_t_f_solution); |
|
|
|
} |
|
|
|
|
|
|
|
bool e_true_false(char choice) { |
|
|
|
if (choice == 'T') { |
|
|
|
return true; |
|
|
|
} else if(choice == 'F') { |
|
|
|
return false; |
|
|
|
} else { |
|
|
|
return -1; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
void e_smart_brain() { |
|
|
|
e_display_instruction(); |
|
|
|