|
@ -214,7 +214,8 @@ void guess_word_questions() { |
|
|
"se_t_em__t", |
|
|
"se_t_em__t", |
|
|
"___lia___ta_y", |
|
|
"___lia___ta_y", |
|
|
"m_n_s__r__s", |
|
|
"m_n_s__r__s", |
|
|
"si__if_ca__e" |
|
|
|
|
|
|
|
|
"si__if_ca__e", |
|
|
|
|
|
"ch__le_g_" |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
char guess_solution [][100] = { |
|
|
char guess_solution [][100] = { |
|
@ -229,7 +230,8 @@ void guess_word_questions() { |
|
|
"tlen", |
|
|
"tlen", |
|
|
"parmenr", |
|
|
"parmenr", |
|
|
"oateie", |
|
|
"oateie", |
|
|
"gninc" |
|
|
|
|
|
|
|
|
"gninc", |
|
|
|
|
|
"alne" |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
char word_guessed[][100] = { |
|
|
char word_guessed[][100] = { |
|
@ -244,14 +246,15 @@ void guess_word_questions() { |
|
|
"settlement", |
|
|
"settlement", |
|
|
"Parliamentary", |
|
|
"Parliamentary", |
|
|
"monasteries", |
|
|
"monasteries", |
|
|
"significance" |
|
|
|
|
|
|
|
|
"significance", |
|
|
|
|
|
"challenge" |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
print_guess_word_question (guess_words, guess_solution,word_guessed); |
|
|
|
|
|
|
|
|
int* randArr0 = randomNumber(); |
|
|
|
|
|
print_guess_word_question (guess_words, guess_solution,word_guessed, randArr0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void print_guess_word_question (char guessWord[][100], char guessSolution[][100],char guessedWord[][100]){ |
|
|
|
|
|
|
|
|
void print_guess_word_question (char guessWord[][100], char guessSolution[][100],char guessedWord[][100], int randArr[]){ |
|
|
|
|
|
|
|
|
printf("\t\t---------------------------Round4-----------------------------\n\n"); |
|
|
printf("\t\t---------------------------Round4-----------------------------\n\n"); |
|
|
printf("\t\t >>You have to guess what word it is by filling\n"); |
|
|
printf("\t\t >>You have to guess what word it is by filling\n"); |
|
@ -260,17 +263,18 @@ void print_guess_word_question (char guessWord[][100], char guessSolution[][100] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int j = 0; j < 4; j ++) { |
|
|
for (int j = 0; j < 4; j ++) { |
|
|
|
|
|
int runNum = randArr[j]; |
|
|
char usr_ans[100]; |
|
|
char usr_ans[100]; |
|
|
int k = 0; |
|
|
int k = 0; |
|
|
printf("[%d]. Guess the word by finding the missing Letters:\n %s: \n",j+1, guessWord[j]); |
|
|
|
|
|
|
|
|
printf("[%d]. Guess the word by finding the missing Letters:\n %s: \n",j+1, guessWord[runNum]); |
|
|
printf(" Your answer: "); |
|
|
printf(" Your answer: "); |
|
|
scanf("%s",usr_ans); |
|
|
scanf("%s",usr_ans); |
|
|
|
|
|
|
|
|
char arr[30]; |
|
|
char arr[30]; |
|
|
for(int p = 0; p < 30; p++) { |
|
|
for(int p = 0; p < 30; p++) { |
|
|
arr[p] = guessSolution[j][p]; |
|
|
|
|
|
|
|
|
arr[p] = guessSolution[runNum][p]; |
|
|
|
|
|
|
|
|
if (guessSolution[j][p] == '\0') { |
|
|
|
|
|
|
|
|
if (guessSolution[runNum][p] == '\0') { |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -287,7 +291,7 @@ void print_guess_word_question (char guessWord[][100], char guessSolution[][100] |
|
|
if (k == strlen(arr) && strlen(usr_ans) == strlen(arr)) { |
|
|
if (k == strlen(arr) && strlen(usr_ans) == strlen(arr)) { |
|
|
score++; |
|
|
score++; |
|
|
printf("Correct!\nYou have %d points\n",score); |
|
|
printf("Correct!\nYou have %d points\n",score); |
|
|
printf("You guessed right! The word is rightfully, %s!\n\n", guessedWord[j]); |
|
|
|
|
|
|
|
|
printf("You guessed right! The word is rightfully, %s!\n\n", guessedWord[runNum]); |
|
|
} else { |
|
|
} else { |
|
|
printf("Wrong!\nYou have %d points\n", score); |
|
|
printf("Wrong!\nYou have %d points\n", score); |
|
|
} |
|
|
} |
|
|