Browse Source

million game - added reward for correct answer

main
fdlt3917 2 years ago
parent
commit
53042a6ded
  1. 10
      src/main/quizproject.c

10
src/main/quizproject.c

@ -660,7 +660,7 @@ void play_milliongame() {
int million_i = 0, million_k = 0;; int million_i = 0, million_k = 0;;
char million_user_answers[round]; char million_user_answers[round];
char million_std_answers[round] = {'B', 'A', 'A'}; char million_std_answers[round] = {'B', 'A', 'A'};
int million_stay_in_game = 0;
int million_stay_in_game = 0, million_reward = 0;
int million_lifeline_hint = 1, million_lifeline_delete = 1; int million_lifeline_hint = 1, million_lifeline_delete = 1;
char questions[round][256] = { char questions[round][256] = {
@ -693,6 +693,8 @@ void play_milliongame() {
case 'A': case 'A':
if(million_user_answers[million_i] == million_std_answers[million_i]){ if(million_user_answers[million_i] == million_std_answers[million_i]){
printf("\nCorrect!"); printf("\nCorrect!");
million_reward = million_reward + (10000 * (million_i+1));
printf("\n%d\n",million_reward);
} }
else{ else{
printf("\nIncorrect!"); printf("\nIncorrect!");
@ -701,6 +703,8 @@ void play_milliongame() {
break; break;
case 'B': case 'B':
if(million_user_answers[million_i] == million_std_answers[million_i]){ if(million_user_answers[million_i] == million_std_answers[million_i]){
million_reward = million_reward + (10000 * (million_i+1));
printf("\n%d\n",million_reward);
printf("\nCorrect!"); printf("\nCorrect!");
} }
else{ else{
@ -710,6 +714,8 @@ void play_milliongame() {
break; break;
case 'C': case 'C':
if(million_user_answers[million_i] == million_std_answers[million_i]){ if(million_user_answers[million_i] == million_std_answers[million_i]){
million_reward = million_reward + (10000 * (million_i+1));
printf("\n%d\n",million_reward);
printf("\nCorrect!"); printf("\nCorrect!");
} }
else{ else{
@ -719,6 +725,8 @@ void play_milliongame() {
break; break;
case 'D': case 'D':
if(million_user_answers[million_i] == million_std_answers[million_i]){ if(million_user_answers[million_i] == million_std_answers[million_i]){
million_reward = million_reward + (10000 * (million_i+1));
printf("\n%d\n",million_reward);
printf("\nCorrect!"); printf("\nCorrect!");
} }
else{ else{

Loading…
Cancel
Save