Browse Source

hint for round 5 of smart brain

main
parent
commit
053fecb776
  1. 27
      src/main/quizproject.c
  2. 1
      src/main/quizproject.h

27
src/main/quizproject.c

@ -35,6 +35,21 @@ void e_press_key_start() {
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() {
printf("\t\t-------------------------------------------------------\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("Answer: ");
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;
for (int j = 0; j < strlen(print_out_questn[rNum]); j ++){
if(usr_ans[j] == questions[rNum][j]) {

1
src/main/quizproject.h

@ -49,6 +49,7 @@ void guess_word_questions(void);
void print_guess_word_question (char [][100], char [][100],char [][100], int []);
void e_printout(char [][100], char [][100], int []);
void e_anagram_questions(void);
void hint_anagram(int);
//----smart_brain_header_end-------
//Epic Game Headers

Loading…
Cancel
Save