I tried adding a few things in there however My correct and Incorrect counters read 2686788 at the end I am not sure what went wrong
Code
// Trivia Game
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
/********************************************
FUNCTION PROTOTYPES
********************************************/
int ZeldaQuestion1(void);
int PokemonQuestion1(void);
int MarioQuestion1 (void);
int DigimonQuestion1 (void);
void pause(int);
/*******************************************/
/********************************************
GLOBAL VARIABLE
********************************************/
int giResponse = 0;
/*******************************************/
main()
{
int giResponse = 0;
int NumberCorrect = 0;
int NumberIncorrect = 0;
do {
system("cls");
printf("\n\tTHE GAMERS TRIVIA GAME\n\n");
printf("1\tZelda\n");
printf("2\tPokemon\n");
printf("3\tMario\n");
printf("4\tDigimon\n");
printf("5\tQuit\n");
printf("\n\nEnter your selection: ");
scanf("%d", &giResponse);
switch(giResponse)
{
case 1:
if (ZeldaQuestion1() == 4)
printf("\nCorrect!\n"), NumberCorrect++;
else
printf("\nIncorrect\n"),NumberIncorrect++;
pause(2);
break;
case 2:
if (PokemonQuestion1() == 2)
printf("\nCorrect!\n"), NumberCorrect++;
else
printf("\nIncorrect\n"),NumberIncorrect++;
pause(2);
break;
case 3:
if (MarioQuestion1() == 3)
printf("\nCorrect!\n"),NumberCorrect++;
else
printf("\nIncorrect\n"),NumberIncorrect++;
case 4:
if (DigimonQuestion1() == 1)
printf("\nCorrect!\n"),NumberCorrect++;
else
printf("\nIncorrect\n"),NumberIncorrect++;
} //end switch
} while ( giResponse != 5 );
printf ("\nYou have correctly answered %d questions correctly\n"), NumberCorrect;
printf ("\nYou have answered %d questions incorrectly\n"), NumberIncorrect;
system ("pause");
} //end main function
/**********************************************************
FUNCTION DEFINITION
**********************************************************/
int ZeldaQuestion1(void)
{
int iAnswer = 0;
system("cls");
printf("\nWho is the Main character in the zelda series? ");
printf("\n\n1\tYourself\n");
printf("2\tZelda\n");
printf("3\tGannon\n");
printf("4\tLink\n");
printf("\nEnter your selection: ");
scanf("%d", &iAnswer);
return iAnswer;
} //end ZeldaQuestion1 function
/**********************************************************
FUNCTION DEFINITION
**********************************************************/
int PokemonQuestion1(void)
{
int iAnswer = 0;
system("cls");
printf("\tPokemon Question\n");
printf("\nWhat pokemon belongs to pokedex # 133 ");
printf("\n\n1\tPikachu\n");
printf("2\tEevee\n");
printf("3\tCharizard\n");
printf("4\tDragonite\n");
printf("\nEnter your selection: ");
scanf("%d", &iAnswer);
return iAnswer;
} //end PokemonQuestion1 function
/**********************************************************
FUNCTION DEFINITION
**********************************************************/
int MarioQuestion1(void)
{
int iAnswer = 0;
system("cls");
printf("\nWhat is mario's last name? ");
printf("\n\n1\tNothing\n");
printf("2\tMario\n");
printf("3\tLuigi\n");
printf("4\tRomano\n");
printf("\nEnter your selection: ");
scanf("%d", &iAnswer);
return iAnswer;
} //end MarioQuestion1 function
/**********************************************************
FUNCTION DEFINITION
**********************************************************/
int DigimonQuestion1(void)
{
int iAnswer = 0;
system("cls");
printf("\nWhat does agumon originally digivolve to? ");
printf("\n\n1\tGreymon\n");
printf("2\tRiseGreymon\n");
printf("3\tWargreymon\n");
printf("4\tShiningGreymon\n");
printf("\nEnter your selection: ");
scanf("%d", &iAnswer);
return iAnswer;
} //end ZeldaQuestion1 function
/***********************************************************
FUNCTION DEFINITION
************************************************************/
void pause(int inNum)
{
int iCurrentTime = 0;
int iElapsedTime = 0;
iCurrentTime = (time(NULL));
do
{
iElapsedTime = time(NULL);
} while ( (iElapsedTime - iCurrentTime) < inNum );
} // end pause function