Cplusplus code for Game/Project “Dus Ka Dum”

*********************Intended for Schools and Colleges Audience*************

Often we have to submit some c plus plus project for class XI, XII , Engineering or other Computer courses.

Below is simple cpp source code for the game based on television show called “DUS KA DUM

Features:-

    1. Quiz based random multiple choice questions.
    2. Graphs same like Audience Poll.
    3. Expert Suggestion (1 Helpline).
    4. Window of 10 %.
    5. Password Protected (password is 271).

Please find the source code , take reference and modify it as per your project design consideration

#include<iostream.h>
#include<conio.h>
#include<graphics.h>
#include<dos.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

int k=0,r,flag,g,d;
void body(int q)
{char ch=271;
clrscr();
for(int i=1;i<26;i++)
{
gotoxy(60,i);

cout<<“|”;
}
gotoxy(64,22-(q*3));
cout<<ch;
gotoxy(65,22);
cout<<” RS 1000″;
gotoxy(65,19);
cout<<” RS 10000″;
gotoxy(65,16);
cout<<” RS 100000″;
gotoxy(65,13);
cout<<” RS 1000000″;
gotoxy(65,10);
cout<<” RS 10000000″;
gotoxy(65,7);
cout<<” RS 100000000″;
for(i=1;i<=10;i++)
{ gotoxy(1,i);
cout<<i;
}
for(i=1;i<=10;i++)
{ gotoxy(6,i);
cout<<i+10;
}
for(i=1;i<=10;i++)
{ gotoxy(12,i);
cout<<i+20;
}
for(i=1;i<=10;i++)
{ gotoxy(18,i);
cout<<i+30;
}
for(i=1;i<=10;i++)
{ gotoxy(24,i);
cout<<i+40;
}
for(i=1;i<=10;i++)
{ gotoxy(30,i);
cout<<i+50;
}
for(i=1;i<=10;i++)
{ gotoxy(36,i);
cout<<i+60;
}
for(i=1;i<=10;i++)
{ gotoxy(42,i);
cout<<i+70;
}
for(i=1;i<=10;i++)
{ gotoxy(48,i);
cout<<i+80;
}
for(i=1;i<=10;i++)
{ gotoxy(54,i);
cout<<i+90;
}
gotoxy(70,1);
cout<<“g:GRAPH”;
gotoxy(66,25);
cout<<“y:YOUR INFO”;
gotoxy(2,25);
cout<<“h:HELP”;
}
void bod()
{
gotoxy(3,1);
cout<<“<=”;
gotoxy(3,10);
cout<<“<=”;
}

int que()
{
switch(r)
{
case 0:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\n\nHOW MANY INDIANS MEN HAVE DANCE IN TOWEL IN THEIR BEDROOMS “;
break;
case 1:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MANY INDIANS MEN LIKE THIER GIRLFRIEND OR WIFE WHO”;
cout<<“\nIS OLDER THAN HIM”;
break;
case 2:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MANY INDIANS WIFE ALWAYS BUY THIER HUSBAND UNDERWEAR “;
break;
case 3:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN SATISFY WITH THIER LIFE PARTNER”;
break;
case 4:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINK THAT INDIAN GOVERMENT”;
cout<<“\nSYSTEMIS COURRUPTED “;
break;
case 5:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINK THAT DOWRY SYSTEM”;
cout<<“\nIS CORRECT “;
break;
case 6:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINK THAT INDIA BECOME A “;
cout<<“\nSUPERPOWER IN 2020 “;
break;
case 7:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINK THAT WESTERN CULTURE “;
cout<<“\nDOMINATE INDIAN CULTURE “;

break;
case 8:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN LIKES CRICKET THAN ANY”;
cout<<“\nSPORTS “;
break;
case 9:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN WOMEN WANT THIER BOYFRIEND”;
cout<<“\nSPEND MONEY FOR THEM “;
break;
case 10:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINK THAT INDIANS ARE MOST”;
cout<<“\nKIND AND HONEST IN THE WORLD “;
break;
case 11:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN BELIEVE IN SUPERSTIONS”;
break;
case 12:

gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN MEN KEEP THE COMB IN THIER”;
cout<<“\nPOCKET”;
break;
case 13:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN WOMEN TALK ABOUT THIER HUSBAND “;
cout<<“\nSECRET WITH HER FRIENDS”;
break;
case 14:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN YOUNG GENERATION IS ADDICTED TO “;
cout<<“\nSOME DRUGS AND ALCHOLS”;
break;
case 15:
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINKS THAT INDIAN UNIVERSITY’S “;
cout<<“\nFOCUS ON THEORY THAN PRACTICAL “; break; } return k; } void checkq(int r) { if(r==0) { if(d>=12&&d<=21)//22// flag=1; else flag=0; } if(r==1) {if (d>=31&&d<=40)//41// flag=1; else flag=0; } if(r==2) {if (d>=66&&d<=75)//76// flag=1; else flag=0; } if(r==3) {if (d>=38&&d<=47)//48// flag=1; else flag=0; } if(r==4) {if (d>=77&&d<=86)//87// flag=1; else flag=0; } if(r==5) {if (d>=25&&d<=34)//35// flag=1; else flag=0; } if(r==6) {if (d>=46&&d<=55)//56// flag=1; else flag=0; } if(r==7) {if (d>=67&&d<=76)//77// flag=1; else flag=0; } if(r==8) {if (d>=86&&d<=95)//96// flag=1; else flag=0; } if(r==9) {if (d>=59&&d<=68)//69// flag=1; else flag=0; } if(r==10) {if (d>=73&&d<=82)//83// flag=1; else flag=0; } if(r==11) {if (d>=23&&d<=32)//33// flag=1; else flag=0; } if(r==12) {if (d>=53&&d<=62)//63// flag=1; else flag=0; } if(r==13) {if (d>=40&&d<=49)//50// flag=1; else flag=0; } if(r==14) {if (d>=51&&d<=60)//61// flag=1; else flag=0; } if(r==15) {if (d>=67&&d<=76)//77//
flag=1;
else
flag=0;
}
}
void check(int flag)
{int h=0,j,b=d;
clrscr();
for(j=d+1;j<=(d+10);j++)
{gotoxy(70,8+h);
h++;
cout<<j;
}
delay(2000);
char d=271;
gotoxy(30,10);
cout<<“RIGHT”;
gotoxy(40,10);
cout<<“WRONG”;
for(int i=0;i<20;i++)
{ delay(100);
clrscr();

gotoxy(32,9);
cout<<d;
gotoxy(30,10);
cout<<“RIGHT”;
gotoxy(40,10);
cout<<“WRONG”;
delay(100);
if(flag==1&&i==19)
break;
clrscr();
gotoxy(30,10);
cout<<“RIGHT”;
gotoxy(40,10);
cout<<“WRONG”;
gotoxy(42,9);
cout<<d;

}
h=0;
for(j=b+1;j<=(b+10);j++)
{gotoxy(70,8+h);
h++;
cout<<j;
}
if(r==0)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 22%”;
}
if(r==1)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 41%”;
}
if(r==2)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 76%”;
}
if(r==3)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 48%”;
}
if(r==4)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 87%”;
}
if(r==5)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 35%”;
}
if(r==6)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 56%”;
}
if(r==7)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 77%”;
}
if(r==8)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 96%”;
}
if(r==9)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 69%”;
}
if(r==10)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 83%”;
}
if(r==11)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 33%”;
}
if(r==12)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 63%”;
}
if(r==13)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 50%”;
}
if(r==14)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 61%”;
}
if(r==15)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 77%”;
}
delay(3000);
}
void win(int k, int flag)
{clrscr();
if(k==1&&flag==1)
{
cout<<“\n\n\n\n\n\n\n\t\t\tYOU WIN”;
delay(1000);
cout<<“\n\n\n\t\t\t\tRS 1000”;
delay(1000);
cout<<“\n\n\n\t\t\t\tNEXT QUESTION”;
delay(1000);
cout<<“\n\n\n\t\t\t\tFOR RS 10000”;
delay(1000);
cout<<“\n\n\n\t\t\t\tHERE ON YOUR SCREEN”;

}
if(k==1&&flag==0)
{
cout<<“\n\n\n\n\n\n\n\t\t\tOOPS! YOU LOST…”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND TAKE RS 0 WITH YOU”;
delay(1000);
cout<<“\n\n\n\t\t\t\tBETTER LUCK NEXT TIME”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND THANKX FOR PLAYING”;
}
if(k==2&&flag==1)
{
cout<<“\n\n\n\n\n\n\n\t\t\tYOU WIN”;
delay(1000);
cout<<“\n\n\n\t\t\t\tRS 10000”;
delay(1000);
cout<<“\n\n\n\t\t\t\tNEXT QUESTION”;
delay(1000);
cout<<“\n\n\n\t\t\t\tFOR RS 100000”;
delay(1000);
cout<<“\n\n\n\t\t\t\tHERE ON YOUR SCREEN”;

}
if(k==2&&flag==0)
{
cout<<“\n\n\n\n\n\n\n\t\t\tOOPS! YOU LOST…”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND TAKE RS 1000 WITH YOU”;
delay(1000);
cout<<“\n\n\n\t\t\t\tBETTER LUCK NEXT TIME”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND THANKX FOR PLAYING”;
}
if(k==3&&flag==1)
{
cout<<“\n\n\n\n\n\n\n\t\t\tYOU WIN”;
delay(1000);
cout<<“\n\n\n\t\t\t\tRS 100000”;
delay(1000);
cout<<“\n\n\n\t\t\t\tNEXT QUESTION”;
delay(1000);
cout<<“\n\n\n\t\t\t\tFOR RS 1000000”;
delay(1000);
cout<<“\n\n\n\t\t\t\tHERE ON YOUR SCREEN”;

}
if(k==3&&flag==0)
{
cout<<“\n\n\n\n\n\n\n\t\t\tOOPS! YOU LOST…”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND TAKE RS 10000 WITH YOU”;
delay(1000);
cout<<“\n\n\n\t\t\t\tBETTER LUCK NEXT TIME”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND THANKX FOR PLAYING”;
}
if(k==4&&flag==1)
{
cout<<“\n\n\n\n\n\n\n\t\t\tYOU WIN”;
delay(1000);
cout<<“\n\n\n\t\t\t\tRS 1000000”;
delay(1000);
cout<<“\n\n\n\t\t\t\tNEXT QUESTION”;
delay(1000);
cout<<“\n\n\n\t\t\t\tFOR RS 10000000”;
delay(1000);
cout<<“\n\n\n\t\t\t\tHERE ON YOUR SCREEN”;

}
if(k==4&&flag==0)
{
cout<<“\n\n\n\n\n\n\n\t\t\tOOPS! YOU LOST…”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND TAKE RS 100000 WITH YOU”;
delay(1000);
cout<<“\n\n\n\t\t\t\tBETTER LUCK NEXT TIME”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND THANKX FOR PLAYING”;
}
if(k==5&&flag==1)
{
cout<<“\n\n\n\n\n\n\n\t\t\tYOU WIN”;
delay(1000);
cout<<“\n\n\n\t\t\t\tRS 10000000”;
gotoxy(70,25);
cout<<“WAIT….”;
delay(3500);
clrscr();
cout<<“\n\n\n\n\t\t\t…….NOW THE LAST QUESTION………”;
delay(1000);
cout<<“\n\n\n\t\t\t\tFOR RS 100000000”;
delay(1000);
cout<<“\n\n\n\t\t\t\tHERE ON YOUR SCREEN”;

}
if(k==5&&flag==0)
{
cout<<“\n\n\n\n\n\n\n\t\t\tOOPS! YOU LOST…”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND TAKE RS 1000000 WITH YOU”;
delay(1000);
cout<<“\n\n\n\t\t\t\tBETTER LUCK NEXT TIME”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND THANKX FOR PLAYING”;
}
if(k==6&&flag==1)
{for(int f=0;f<=1999;f++)
{ delay(10);
cout<<“*”;
}
gotoxy(20,5);
cout<<“CONGRATULTION!”;
gotoxy(30,8);
cout<<“YOU WIN RS 100000000”;
gotoxy(30,11);
cout<<“YOU PLAYED VERY WELL”;
gotoxy(30,14);
cout<<“NOW ENJOY BYE BYE “;
gotoxy(30,17);
cout<<“GOOD LUCK”;

}
if(k==6&&flag==0)
{
cout<<“\n\n\n\n\n\n\n\t\t\tOOPS! YOU LOST…”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND TAKE RS 10000000 WITH YOU”;
delay(1000);
cout<<“\n\n\n\t\t\t\tBETTER LUCK NEXT TIME”;
delay(1000);
cout<<“\n\n\n\t\t\t\tAND THANKX FOR PLAYING”;
}
delay(1000);
}

void dus()
{
clrscr();
for(int i=0;i<36;i++)
{delay(100);
gotoxy(i,12);
cout<<“.”;
}
cout<<“WELCOME “;
delay(1000);
for( i=0;i<38;i++)
{delay(100);
gotoxy(i+43,12);
cout<<“.”;
}
delay(1000);
clrscr();
for( i=0;i<36;i++)
{delay(100);
gotoxy(i,4);
cout<<“.”;
}
cout<<“LETS PLAY “;
delay(1000);
for( i=0;i<35;i++)
{
delay(100);
gotoxy(i+45,4);
cout<<“.”;
}
clrscr();
for(int m=0;m<6;m++)
{
gotoxy(27,15-(m*2));
cout<<“DUS——-KAAA……DUMMMMMM “;
for( i=0;i<36;i++)
{
gotoxy(i,4);
cout<<“.”;
}
cout<<“LETS PLAY “;

for( i=0;i<35;i++)
{
gotoxy(i+45,4);
cout<<“.”;
}
delay(1000);
clrscr();
}
}
void rule()
{ char ch=271;
gotoxy(36,1);
cout<<“RULES”;
gotoxy(36,2);
cout<<“——“;
cout<<“\n\n1.(<=,<=)THIS IS THE WINDOW OF 10% USE KEY(UP,DOWN)”;
cout<<“\nTO SELECT YOUR ANSWER”;
cout<<“\n\n\n\n2.”<<ch;
cout<<” IT SHOWS FOR WHAT PRICE YOU ARE PLAYING ON RIGHT SIDE OF SCREEN”;
cout<<“\n\n\n3.USE ENTER KEY TO SELECT YOUR ANSWER”;
cout<<“\n\n\n4.FOR HELP YOU CAN SEE AUDIONS GRAPH BY USING g KEY AND b KEY”;
cout<<“\nFOR BACK TO MAIN SCREEN”;
cout<<“\n\n\n5.IF YOUR ANSWER IS WRONG YOUR GAME IS OVER”;
gotoxy(70,24);
cout<<“loading….”;
delay(20000);
}
void main()
{clrscr();
_setcursortype(_NOCURSOR);
int p,m=0;
cout<<“\nENTER PASSWORD”; cin>>p;
if(p==271)
{
dus();
rule();
int q=0;
do
{ g=0;
d=0;
char ch;

body(q);
bod();
randomize();
r=random(16);
switch(r)
{
case 0:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\n\nHOW MANY INDIANS MEN HAVE DANCE IN TOWEL IN THEIR BEDROOMS”;
break;
case 1:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MANY INDIANS MEN LIKE THIER GIRLFRIEND OR WIFE WHO”;
cout<<“\nIS OLDER THAN HIM”;
break;
case 2:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MANY INDIANS WIFE ALWAYS BUY THIER HUSBAND UNDERWEAR”;
break;
case 3:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN SATISFY WITH THIER LIFE PARTNER”;
break;
case 4:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINK THAT INDIAN GOVERMENT”;
cout<<“\nSYSTEMIS COURRUPTED “;
break;
case 5:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINK THAT DOWRY SYSTEM”;
cout<<“\nIS CORRECT “;
break;
case 6:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINK THAT INDIA BECOME A “;
cout<<“\nSUPERPOWER IN 2020 “;
break;
case 7:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINK THAT WESTERN CULTURE “;
cout<<“\nDOMINATE INDIAN CULTURE “;

break;
case 8:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN LIKES CRICKET THAN ANY”;
cout<<“\nSPORTS “;
break;
case 9:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN WOMEN WANT THIER BOYFRIEND”;
cout<<“\nSPEND MONEY FOR THEM “;
break;
case 10:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINK THAT INDIANS ARE MOST”;
cout<<“\nKIND AND HONEST IN THE WORLD “;
break;
case 11:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN BELIEVE IN SUPERSTIONS”;
break;
case 12:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN MEN KEEP THE COMB IN THIER”;
cout<<“\nPOCKET”;
break;
case 13:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN WOMEN TALK ABOUT THIER HUSBAND”;
cout<<“\nSECRET WITH HER FRIENDS”;
break;
case 14:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN YOUNG GENERATION IS ADDICTED TO”;
cout<<“\nSOME DRUGS AND ALCHOLS”;
break;
case 15:++k;
delay(1000);
gotoxy(6,15);
cout<<“\tQUESTION NO “<<k;
delay(1000);
cout<<“\n\nHOW MUCH PERCENT OF INDIAN THINKS THAT INDIAN UNIVERSITY’S”;
cout<<“\nFOCUS ON THEORY THAN PRACTICAL “;
break;
}
do
{
ch=getch();
switch(ch)
{
case ‘b’:
case 80:d++;
g++;
body(q);
que();
if(d<10)
{
gotoxy(3,d+1) ;
cout<<“<=”;
}
if(g==1)
{
gotoxy(9,g) ;
cout<<“<=”; } if(g>1&&g<11)
{
gotoxy(9,g) ;
cout<<“<=”; } if(d>9&&d<20)
{
gotoxy(9,d-9) ;
cout<<“<=”; } if(g>10&&g<21)
{
gotoxy(15,g-10) ;
cout<<“<=”; } if(d>19&&d<30)
{
gotoxy(15,d-19) ;
cout<<“<=”; } if(g>20&&g<31)
{
gotoxy(21,g-20) ;
cout<<“<=”; } if(d>29&&d<40)
{
gotoxy(21,d-29) ;
cout<<“<=”; } if(g>30&&g<41)
{
gotoxy(27,g-30) ;
cout<<“<=”; } if(d>39&&d<50)
{
gotoxy(27,d-39) ;
cout<<“<=”; } if(g>40&&g<51)
{
gotoxy(33,g-40) ;
cout<<“<=”; } if(d>49&&d<60)
{
gotoxy(33,d-49) ;
cout<<“<=”; } if(g>50&&g<61)
{
gotoxy(39,g-50) ;
cout<<“<=”; } if(d>59&&d<70)
{
gotoxy(39,d-59) ;
cout<<“<=”; } if(g>60&&g<71)
{
gotoxy(45,g-60) ;
cout<<“<=”; } if(d>69&&d<80)
{
gotoxy(45,d-69) ;
cout<<“<=”; } if(g>70&&g<81)
{
gotoxy(51,g-70) ;
cout<<“<=”; } if(d>79&&d<90)
{
gotoxy(51,d-79) ;
cout<<“<=”; } if(g>80&&g<91)
{
gotoxy(57,g-80) ;
cout<<“<=”;
}
if(d==90)
{ gotoxy(57,d-89) ;
cout<<“<=”; } if(d>90)
{
gotoxy(57,d-90) ;
cout<<“<=”; d–; } if(g>=91)
{
gotoxy(57,g-81) ;
cout<<“<=”;
g–;
}
break;
case 72:d–;
g–;
body(q);
que();
if(d<0) {bod(); d++; g++; } if(d==0) {bod(); } if(d>0&&d<10)
{
gotoxy(3,d+1) ;
cout<<“<=”;
}
if(g==1)
{
gotoxy(9,g) ;
cout<<“<=”; } if(g>1&&g<11)
{
gotoxy(9,g) ;
cout<<“<=”; } if(d>9&&d<20)
{
gotoxy(9,d-9) ;
cout<<“<=”; } if(g>10&&g<21)
{
gotoxy(15,g-10) ;
cout<<“<=”; } if(d>19&&d<30)
{
gotoxy(15,d-19) ;
cout<<“<=”; } if(g>20&&g<31)
{
gotoxy(21,g-20) ;
cout<<“<=”; } if(d>29&&d<40)
{
gotoxy(21,d-29) ;
cout<<“<=”; } if(g>30&&g<41)
{
gotoxy(27,g-30) ;
cout<<“<=”; } if(d>39&&d<50)
{
gotoxy(27,d-39) ;
cout<<“<=”; } if(g>40&&g<51)
{
gotoxy(33,g-40) ;
cout<<“<=”; } if(d>49&&d<60)
{
gotoxy(33,d-49) ;
cout<<“<=”; } if(g>50&&g<61)
{
gotoxy(39,g-50) ;
cout<<“<=”; } if(d>59&&d<70)
{
gotoxy(39,d-59) ;
cout<<“<=”; } if(g>60&&g<71)
{
gotoxy(45,g-60) ;
cout<<“<=”; } if(d>69&&d<80)
{
gotoxy(45,d-69) ;
cout<<“<=”; } if(g>70&&g<81)
{
gotoxy(51,g-70) ;
cout<<“<=”; } if(d>79&&d<90)
{
gotoxy(51,d-79) ;
cout<<“<=”; } if(g>80&&g<91)
{
gotoxy(57,g-80) ;
cout<<“<=”;
}
if(d==90)
{ gotoxy(57,d-89) ;
cout<<“<=”; } if(d>90)
{
gotoxy(57,d-90) ;
cout<<“<=”; } if(g>=91)
{
gotoxy(57,g-81) ;
cout<<“<=”;

}
break;
case ‘g’:clrscr();
gotoxy(6,20);
cout<<“—— —— —— —— —— —— —— —— —— ——“;
gotoxy(10,21);
cout<<“10-20%”;
gotoxy(17,21);
cout<<“20-30%”;
gotoxy(24,21);
cout<<“30-40%”;
gotoxy(31,21);
cout<<“40-50%”;
gotoxy(38,21);
cout<<“50-60%”;
gotoxy(45,21);
cout<<“60-70%”;
gotoxy(52,21);
cout<<“70-80%”;
gotoxy(59,21);
cout<<“80-90%”;
gotoxy(66,21);
cout<<“90-100%”;
gotoxy(32,23);
cout<<“NUMBER OF PEOPLE ” ;
for(int i=0;i<21;i++)
{
gotoxy(8,1+i);
cout<<“|”;
}
gotoxy(4,19);
cout<<“10%”;
gotoxy(4,17);
cout<<“20%”;
gotoxy(4,15);
cout<<“30%”;
gotoxy(4,13);
cout<<“40%”;
gotoxy(4,11);
cout<<“50%”;
gotoxy(4,9);
cout<<“60%”;
gotoxy(4,7);
cout<<“70%”;
gotoxy(4,5);
cout<<“80%”;
gotoxy(4,3);
cout<<“90%”;
gotoxy(4,1);
cout<<“100%”;
gotoxy(70,1);
cout<<“b:BACK”;
gotoxy(66,25);
cout<<“y:YOUR INFO”; if(r==0) { for(int k=19;k>=16;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=15;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=16;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=16;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=17;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=15;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=14;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=16;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=16;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==1) { for(int k=19;k>=13;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=13;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=12;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=12;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=13;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=11;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=13;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=13;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=12;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==2) { for(int k=19;k>=6;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=7;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=7;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=6;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=7;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=9;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==3) { for(int k=19;k>=11;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=10;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=9;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=9;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=11;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=11;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=12;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=9;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=7;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==4) { for(int k=19;k>=4;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=4;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=4;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=4;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=4;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=3;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=3;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=3;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=2;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==5) { for(int k=19;k>=12;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=13;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=14;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=15;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=15;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=14;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=14;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=14;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=16;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==6) { for(int k=19;k>=11;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=12;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=11;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=12;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=13;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=14;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=14;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=11;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=10;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==7) { for(int k=19;k>=9;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=8;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=7;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=6;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=9;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=10;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=9;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==8) { for(int k=19;k>=2;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=2;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=3;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=4;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=1;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=7;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=3;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=2;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=4;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==9) { for(int k=19;k>=9;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=9;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=10;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=11;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=10;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=7;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==10) { for(int k=19;k>=6;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=7;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=6;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=5;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=5;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=4;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=5;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=5;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=6;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==11) { for(int k=19;k>=14;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=14;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=13;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=15;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=15;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=15;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=14;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=14;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=16;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==12) { for(int k=19;k>=11;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=7;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=11;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=7;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=7;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=6;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==13) { for(int k=19;k>=10;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=7;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=10;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=12;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=11;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=14;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=10;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=9;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==14) { for(int k=19;k>=9;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=8;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=9;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=9;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=9;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“; } } if(r==15) { for(int k=19;k>=6;k–)
{gotoxy(12,k);
delay(100);
cout<<“-“; }for( k=19;k>=8;k–)
{gotoxy(19,k);
delay(100);
cout<<“-“; } for( k=19;k>=7;k–)
{gotoxy(26,k);
delay(100);
cout<<“-“; } for( k=19;k>=7;k–)
{gotoxy(33,k);
delay(100);
cout<<“-“; } for( k=19;k>=8;k–)
{gotoxy(40,k);
delay(100);
cout<<“-“; } for( k=19;k>=6;k–)
{gotoxy(47,k);
delay(100);
cout<<“-“; } for( k=19;k>=6;k–)
{gotoxy(54,k);
delay(100);
cout<<“-“; } for( k=19;k>=6;k–)
{gotoxy(61,k);
delay(100);
cout<<“-“; } for( k=19;k>=5;k–)
{gotoxy(68,k);
delay(100);
cout<<“-“;
}
}
break;
case ‘y’:clrscr();
cout<<“\n\n\n\n\n\t\tYOU ARE PLAYING FOR 1000”; for(int f=k;f>1;f–)
{cout<<“0”;
}
gotoxy(70,1);
cout<<“g:GRAPH”;
gotoxy(70,25);
cout<<“b:BACK”;
break;
case’h’:clrscr();
gotoxy(30,1) ;
cout<<“HELP”;
gotoxy(70,25);
cout<<“b:BACK”;
gotoxy(7,8);
cout<<“e:EXPERTS SUGGESTION “;
break;
case’e’:if(m==0)
{
if(r==0)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 22%”;
}
if(r==1)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 41%”;
}
if(r==2)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 76%”;
}
if(r==3)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 48%”;
}
if(r==4)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 87%”;
}
if(r==5)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 35%”;
}
if(r==6)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 56%”;
}
if(r==7)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 77%”;
}
if(r==8)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 96%”;
}
if(r==9)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 69%”;
}
if(r==10)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 83%”;
}
if(r==11)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 33%”;
}
if(r==12)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 63%”;
}
if(r==13)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 50%”;
}
if(r==14)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 61%”;
}
if(r==15)
{gotoxy(27,21);
cout<<“CORRECT ANSWER IS 77%”; } } if(m>0)
{
gotoxy(27,21);
cout<<“YOU HAVE USED IT EARLIER”;
}
m++;
}
}while(ch!=13);
q++;
checkq(r);
check(flag);
win(k,flag);
} while(q<6&&flag==1);
}
getch();
}

———————-End of source code————————————

Please click duskadum to download source code

Tip:- Please change the (int que) function to change the question and (void checkq ) to its corresponding awnsers.

Facebook Comments
Like
Like Love Haha Wow Sad Angry
1
Share with friends

You may also like...

Great. Thanks

Top Categories
Now enjoy our special red WhatsApp button
More in Easy Tutorials, Misc
How to take Cpanel Backup for your Website

Cpanel Backup Cpanel Backup of website is very important which is...

Close