|
@ -35,6 +35,21 @@ void e_press_key_start() { |
|
|
e_start_game = toupper(e_start_game); |
|
|
e_start_game = toupper(e_start_game); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void hint_anagram(int hint_num) { |
|
|
|
|
|
char hint_questions[][100] = { |
|
|
|
|
|
"d_v_l_p_e_t", |
|
|
|
|
|
"i_t_r_a_i_nal", |
|
|
|
|
|
"p_l__im_ge", |
|
|
|
|
|
"o_e__t_on", |
|
|
|
|
|
"p_p_la__on", |
|
|
|
|
|
"p__g__ss", |
|
|
|
|
|
"c_a__en_e", |
|
|
|
|
|
"e_ce__en_e", |
|
|
|
|
|
"al_o_ati__" |
|
|
|
|
|
}; |
|
|
|
|
|
printf("Here is your hint: %s\n",hint_questions[hint_num]); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void e_display_instruction() { |
|
|
void e_display_instruction() { |
|
|
printf("\t\t-------------------------------------------------------\n"); |
|
|
printf("\t\t-------------------------------------------------------\n"); |
|
|
printf("\t\t To start this Quiz, here are the instructions\n"); |
|
|
printf("\t\t To start this Quiz, here are the instructions\n"); |
|
@ -322,6 +337,18 @@ void e_printout(char print_out_questn[][100], char questions[][100],int randArr[ |
|
|
printf("[%d] Guess is the correct word for this anagram: %s\n", i+1, print_out_questn[rNum]); |
|
|
printf("[%d] Guess is the correct word for this anagram: %s\n", i+1, print_out_questn[rNum]); |
|
|
printf("Answer: "); |
|
|
printf("Answer: "); |
|
|
scanf("%s", usr_ans); |
|
|
scanf("%s", usr_ans); |
|
|
|
|
|
for(int j = 0; j < strlen(usr_ans); j++) { |
|
|
|
|
|
if (toupper(usr_ans[j]) == 'H' && strlen(usr_ans) == 1) { |
|
|
|
|
|
hint_anagram(rNum); |
|
|
|
|
|
printf("Answer: "); |
|
|
|
|
|
scanf("%s", usr_ans); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
int p = 0; |
|
|
|
|
|
while(p < strlen(usr_ans)) { |
|
|
|
|
|
usr_ans[p] = tolower(usr_ans[p]); |
|
|
|
|
|
p++; |
|
|
|
|
|
} |
|
|
int k = 0; |
|
|
int k = 0; |
|
|
for (int j = 0; j < strlen(print_out_questn[rNum]); j ++){ |
|
|
for (int j = 0; j < strlen(print_out_questn[rNum]); j ++){ |
|
|
if(usr_ans[j] == questions[rNum][j]) { |
|
|
if(usr_ans[j] == questions[rNum][j]) { |
|
|