Browse Source

million game - added fifty option

main
fdlt3917 2 years ago
parent
commit
121c53330e
  1. 30
      src/main/quizproject.c

30
src/main/quizproject.c

@ -657,11 +657,11 @@ void play_factorlie() {
void play_milliongame() {
printf("Playing who wants to be a millionaire...\n");
int million_i = 0;
int million_i = 0, million_k = 0;;
char million_user_answers[round];
char million_std_answers[round] = {'B', 'A', 'A'};
int million_stay_in_game = 0;
int million_lifeline_hint = 1;
int million_lifeline_hint = 1, million_lifeline_delete = 1;
char questions[round][256] = {
"What is the capital of France?",
@ -729,6 +729,32 @@ void play_milliongame() {
goto point_one;
break;
case 'F':
million_lifeline_delete = 0;
printf("\nComputer will now MARK two wrong answers...\n");
while(million_k < 4 && million_count_replace < 2){
if(answers[million_i][million_k][0] != million_std_answers[million_i]){
answers[million_i][million_k][0] = 'X';
million_count_replace = million_count_replace + 1;
}
million_k++;
}
for(int million_n = 0; million_n < 4; million_n++){
printf("%s\n",answers[million_i][million_n]);
}
printf("Enter a valid Response: ");
scanf(" %c", &million_user_answers[million_i]);
million_user_answers[million_i] = toupper(million_user_answers[million_i]);
if(million_user_answers[million_i] == million_std_answers[million_i]){
printf("\nCorrect!");
}
else{
million_stay_in_game = 1;
printf("\nIncorrect!");
}
break;
default:
goto point_one;

Loading…
Cancel
Save