Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #define SIZE 10
- #include <stdlib.h>
- #include <string.h>
- void Level1();
- void Level2();
- int main ()
- {
- printf("Welcome to Disney Quiz Game ! Let's win $$$\n\n");
- Level1();
- system("pause");
- return 0;
- }
- void Level1()
- {
- char question[SIZE][1000]={"In Aladdin, what is the name of Jasmine's pet tiger?\n\nA-Rajah\nB-Meow\nC-Cat\nD-Snow",
- "In Peter Pan, Captain Hook had a hook on which one of his hands?\n\nA-Left\nB-Right\nC-None\nD-Both hand",
- "In Beauty and the Beast, how many eggs does Gaston eat for breakfast?\n\nA-5 dozen\nB-6 dozen\nC-7 dozen\nD-8 dozen",
- "After being on earth, where did Hercules first meet his father Zeus?\n\nA-Temple\nB-Home\nC-Mosque\nD-Shopping Mall",
- "The fairygodmother turn the ___ into a carriage.\n\nA-Pumpkin\nB-Lizard\nC-Cabbage\nD-Mice",
- "Who was the first Disney princess?\n\nA-Belle\nB-Snow White\nC-Cinderella\nD-Arielle",
- "What is the name of snowman in Frozen?\n\nA-Kristoff\nB-Hans\nC-Olaf\nD-Olive",
- "In Toy Story, who owns Woody?\n\nA-Toms\nB-Andy\nC-Billy\nD-Hendry",
- "Which Disney classic has a talking mirror which is asked 'Mirror mirror on the wall' ?\n\nA-Cinderella\nB-Alice In The Wonderland\nC-Sleeping Beauty\nD-Snow White",
- "Which Disney princess attempts to disguise herself as a man?\n\nA-Mulan\nB-Tiana\nC-Jasmine\nD-Rapunzell"};
- char answer[SIZE]={'A','A','A','A','A','B','C','B','D','A'};
- char choice, lifeline, y;
- int x=1, prize=200, n;
- do{
- srand(time(NULL));
- fflush(stdin);
- n=strcmpi(question[x],question[x-1]) ;
- if(n!=0)
- {
- printf("Question #%d is worth RM200. The question is : \n-%s\n",x++, question[y=rand()%9],SIZE);
- }
- printf("You can also choose:\n");
- printf("E- Stop playing (and walk away with RM)\nF-Use a lifeline\n");
- printf("\nWhat is your answer: ");
- scanf("%c", &choice);
- choice=toupper(choice);
- if(choice==answer[y])
- printf("Congratulation!\nYour current winning is RM%d\n\n", prize);
- else if(choice=='E')
- printf("You have ended the game. You won RM%d. Thank you for playing!\n", prize);
- else if(choice=='F')
- do{
- printf("Tipoff-T or NewQuest-Q ? :");
- scanf("%c",&lifeline);
- if(lifeline=='T')
- printf("\nTipoff\n");
- else if (lifeline=='Q')
- printf("\nNewQuest\n");
- else
- printf("\nInvalid\n");
- }while(lifeline!='T' && lifeline!='Q');
- else
- {
- printf("Sorry wrong answer. Game over\n");
- return 0;
- }
- prize+=200;
- }while(choice==answer[y]&& x<6);
- printf("Do you want to continue?");
- if(x==6&&choice==answer[y]);
- Level2();
- }
- void Level2()
- {
- char question[SIZE][1000]={"What Disney Film contains the classic song 'Be Our Guest'?\n\nA-Sleeping Beauty\nB-Monster Inc\nC-Beauty And The Beast\nD-Lion King",
- "Which film will you find the characters The Lost Boys?\n\nA-Monster Inc\nB-Peter Pan\nC-The Jungle Book\nD-Merlin",
- "Which Disney cub can not wait to be a King?\n\nA-Kristoff\nB-Simba\nC-Nala\nD-Mufasa",
- "What is Aladdin's main type of magical transport?\n\nA-Magic Lamp\nB-Flying Tile\nC-Leaves\nD-Magic Carpet",
- "In Sleeping Beauty and Snow White, the main characters are awaken by the same act- what is it?\n\nA-A prince's kiss\nB-A warm hug\nC-Sleeping\nD-Drink magic water",
- "What Disney film has an Elastic Girl and An Iceman?\n\nA-Frozen\nB-Toy Story\nC-The Incredibles\nD-Monster Inc",
- "What colour are the Mickey Mouse's shorts?\n\nA-White\nB-Black\nC-Red\nD-Pink",
- "In the movie Finding Nemo, which country has Nemo been taken to?\n\nA-Singapore\nB-Australia\nC-Paris\nD-China",
- "What is the name of Donald Duck's sister?\n\nA-Daisy Duck\nB-Scrooge Mc Duck\nC-Dumbella\nD-He has no sister",
- "For the first time in forever, there'll be music there'll be fun.... What Disney movie is related to this song?\n\nA-Aladdin\nB-Frozen\nC-Beauty And The Beast\nMoana"};
- char answer[SIZE]={'C','B','B','D','A','C','C','B','C','B'};
- char choice, lifeline, y;
- int x=1, prize=400;
- do{
- srand(time(NULL));
- fflush(stdin);
- printf("Question for Level 2 worth RM400. Let's play!\n");
- printf("Q%d-%s\n",x++, question[y=rand()%9],SIZE);
- printf("You can also choose:\n");
- printf("E- Stop playing (and walk away with RM)\nF-Use a lifeline\n");
- printf("\nWhat is your answer: ");
- scanf("%c", &choice);
- choice=toupper(choice);
- if(choice==answer[y])
- printf("Congratulation!\nYour current winning is RM%d\n\n", prize);
- else if(choice=='E')
- printf("You have ended the game. You won RM%d. Thank you for playing!\n", prize);
- else if(choice=='F')
- do{
- printf("Tipoff-T or NewQuest-Q ? :");
- scanf("%c",&lifeline);
- if(lifeline=='T')
- printf("\nTipoff\n");
- else if (lifeline=='Q')
- printf("\nNewQuest\n");
- else
- printf("\nInvalid\n");
- }while(lifeline!='T' && lifeline!='Q');
- else
- {
- printf("Sorry wrong answer. Game over\n");
- }
- prize+=400;
- }while(choice==answer[y]&&x<6);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement