0% found this document useful (0 votes)
884 views6 pages

Who Want's To Be A Millionaire - Simple Code

This document contains the source code for a C program that simulates the game show "Who Wants To Be A Millionaire". The program asks the user a series of multiple choice questions starting at lower cash values and increasing up to 2 million pesos. For each question, the user inputs their answer choice and the program checks if it is correct or incorrect, providing feedback and handling the game logic accordingly.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
884 views6 pages

Who Want's To Be A Millionaire - Simple Code

This document contains the source code for a C program that simulates the game show "Who Wants To Be A Millionaire". The program asks the user a series of multiple choice questions starting at lower cash values and increasing up to 2 million pesos. For each question, the user inputs their answer choice and the program checks if it is correct or incorrect, providing feedback and handling the game logic accordingly.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

#include<stdio.

h>
#include<stdlib.h>
#include<conio.h>
int main()
{
int a,age;
char C[1], name[15], gender[10];
clrscr();
printf("\n\n\n");
printf("
WHO WANT'S TO BE A MILLIONAIRE \n");
printf("\n\n\n");
printf("
Lalaban kaba?\n");
printf("\n\n Do you want to play the game? [YES=1][No=2]: ");
scanf("%d",&a);
if (a==1){
printf("\n\nYou may now play the game\n\n");
}
else{
printf("\n\nThank you for visiting\n");
getch();
return 0;
}
printf("\nENTER YOUR NAME: \n\n");
scanf("%s",&name);
printf("\nENTER YOUR GENDER: \n\n");
scanf("%s",&gender);
printf("\nENTER YOUR AGE: \n\n");
scanf("%d",&age);
printf("\n");
printf("\n");
{
clrscr();
printf("Your name is %s , ",name);
printf("%s ,",gender);
printf("%d years old\n",age);
printf("\n\nEnter [C] to Continue: ");
scanf("%s",C);
}
clrscr();
printf("\n");
printf("\n");
printf("And you are in 'WHO WANT'S TO BE A MILLIONAIRE' ");
printf("\n");
printf("\n");
printf("
Cash Price");

printf("\n");
printf("\n");
printf("
2 million pesos\n");
printf("
1 million pesos\n");
printf("
500 thousand pesos\n");
printf("
100 thousand pesos\n");
printf("
50 thousand pesos\n");
printf("
20 thousand pesos\n");
printf("
5 thousand pesos\n");
{
int b;
clrscr();
printf("\n");
printf("\n");
printf("\n");
printf("HERE'S YOUR QUESTION\n");
printf("\n");
printf("\n");
printf("*********************\nFor 5 thousand pesos\n*********************");
printf("\n\n
What is the shape of sun? \n\n");
printf("\n
1. SQUARE\n");
printf("\n
2. CIRCLE\n");
printf("\n
3. STAR\n");
scanf("\n%d",&b);
if(b==2)
{
printf("\nYou are correct! \n");
}
else{
printf("\nYou're wrong! \n
Thank you for playing!!!\n");
getch();
return 0;
}
printf("\nEnter [ANY KEY] to continue");
getch();
}
clrscr();
{
int c;
printf("\n");
printf("\n");
printf("\n");
printf("HERE'S YOUR QUESTION\n");
printf("\n");
printf("\n");
printf("***********************\n For 20 thousand pesos \n***********************");

printf("\n\n
Who is the mother of crispin and basilyo? \n\n");
printf("\n
1. SISA\n");
printf("\n
2. RUZEL\n");
printf("\n
3. CAMIL\n");
scanf("\n %d",&c);
if(c==1){
printf("\n You are correct! \n");
}
else{
printf("\nYou're wrong! Get your cash price 5 Thousand Pesos!!!\n");
getch();
return 0;
}
printf("\n Enter [ANY KEY] to continue");
getch();
}
clrscr();
{
int d;
printf("\n");
printf("\n");
printf("\n");
printf("HERE'S YOUR QUESTION\n");
printf("\n");
printf("\n");
printf("***********************\n For 50 thousand pesos \n***********************");
printf("\n\n
How many days do we have in a week? \n\n");
printf("\n
1. 8 Days\n");
printf("\n
2. 6 Days\n");
printf("\n
3. 7 Days\n");
scanf("\n %d",&d);
if(d==3){
printf("\n Your correct! \n");
}
else{
printf("\nYou're wrong! Get your cash price 20 Thousand Pesos!!!\n");
getch();
return 0;
}
printf("\n Enter [ANY KEY] to continue");
getch();
}
clrscr();
{
int e;
printf("\n");

printf("\n");
printf("\n");
printf("HERE'S YOUR QUESTION\n");
printf("\n");
printf("\n");
printf("***********************\n For 100 thousand pesos
\n***********************");
printf("\n\n
What is the 1st Generation of computer? \n\n");
printf("\n
1. Vacuum Tubes\n");
printf("\n
2. Transistor\n");
printf("\n
3. Micro Processors\n");
scanf("\n %d",&e);
if(e==1){
printf("\n You are correct! \n");
}
else{
printf("\nYou're wrong! Get your cash price 50 Thousand Pesos!!!\n");
getch();
return 0;
}
printf("\n Enter [ANY KEY] to continue");
getch();
}
clrscr();
{
int f;
printf("\n");
printf("\n");
printf("\n");
printf("HERE'S YOUR QUESTION\n");
printf("\n");
printf("\n");
printf("***********************\n For 500 thousand pesos
\n***********************");
printf("\n\n
Who is the Invertor of Z1? \n\n");
printf("\n
1. Howard Aiken\n");
printf("\n
2. Charles Babrage\n");
printf("\n
3. Konrad Zuse\n");
scanf("\n %d",&f);
if(f==3){
printf("\n You are correct! \n");
}
else{
printf("\nYou're wrong! get your cash price 100 Thousand Pesos!!!\n");
getch();
return 0;

}
printf("\n Enter [ANY KEY] to continue");
getch();
}
clrscr();
{
int g;
printf("\n");
printf("\n");
printf("\n");
printf("HERE'S YOUR QUESTION\n");
printf("\n");
printf("\n");
printf("***********************\n For 1 Million pesos \n***********************");
printf("\n\n
It is an influential and procedural programming? \n\n");
printf("\n
1. FORTRAN\n");
printf("\n
2. PASCAL\n");
printf("\n
3. C++\n");
scanf("\n %d",&g);
if(g==2){
printf("\n You are correct! \n");
}
else{
printf("\nYou're wrong! Get your cash price 500 Thousand Pesos!!!\n");
getch();
return 0;
}
printf("\n Enter [ANY KEY] to continue");
getch();
}
clrscr();
{
int h;
printf("\n");
printf("\n");
printf("\n");
printf("HERE'S YOUR QUESTION\n");
printf("\n");
printf("\n");
printf("***********************\n For 2 Million pesos \n***********************");
printf("\n\n
In programming language what is the \n commonly use that
reads Computer? \n\n");
printf("\n
1. Binary Number\n");
printf("\n
2. Atomic Number\n");

printf("\n
3. Numerical Number\n");
scanf("\n %d",&h);
if(h==1){
printf("\n You are correct! \n");
}
else{
printf("\nYou're wrong! Get your cash price 1 Million Pesos\n Congratulation you
now a Millionaire.\n");
getch();
return 0;
}
printf("\n ************* CONGRATULATIONS YOU WIN 2 MILLION PESOS
*************\n");
printf("\n Enter [ANY KEY] to EXIT");
getch();
return 0;
}
getch();
}

You might also like