Вы находитесь на странице: 1из 24

N.

Visvas XII A

A
Computer
Science
Project
A C++ Program on Quiz
BONAFIDE CERTIFICATE

This is to certify that _______________________________


Reg. no_______________ of class XII studying in
Maharishi International Residential School has
Successfully completed the project entitled ______________
_______________ for AISSCE practical examination
2017-2018 under my guidance.

Date:

Principal Teacher in charge

School Seal External Examiner

1 | Page
ACKNOWLEDGEMENT

I express my sincere thanks to my teacher


Mr.Sethuramalingam for helping me to complete the
work successfully.

I would also like to thank my lab in charge


Mr.Vinod for the timely help.

2 | Page
TABLE OF CONTENTS

S.NO TOPIC PG. NO

1 PROBLEM
DEFINITION

2 PROBLEM
ANALYSIS

3 HARDWARE AND
SOFTWARE
REQUIREMENTS

4 FUTURE
ENHANCEMENT

5 SOURCE CODE

6 SCREENSHOTS

7 BIBLIOGRAPHY

3 | Page
PROBLEM DEFINITION:

IT IS GOOD SOURCE OF INTERACTIVITIES AMONG STUDENTS AND BETWEEN THE


TEACHER AND STUDENTS. IT IS DONE IN ORDER TO IMPROVE STUDENTS
COMPREHENSION LEVELS AND LEARNING MOTIVATION. AS ONE OF THEIR TOOLS,
ONLINE TEST TOOLS ARE QUITE EFFECTIVE. HOWEVER, IN ORDER TO USE THE ONLINE
TEST TOOL, A TEACHER IS GENERALLY REQUIRED A GREAT DEAL OF LABOUR.
FOR EXAMPLE, A TEACHER NEEDS TO CREATE QUIZZES AND INPUT THEM IN THE ONLINE
TEST TOOL.
IN ORDER TO SOLVE THESE PROBLEMS, WE HAVE DEVELOPED A QUIZ GAME SYSTEM
WHICH CAN CREATE QUIZZES COMPETITIVELY AND COLLABORATIVELY BY STUDENTS
FOR THE PURPOSE OF REDUCING THE LOAD REQUIRED FOR A TEACHER AND PROMOTING
INTERACTIONS AMONG STUDENTS AND BETWEEN THE TEACHER AND STUDENTS.

PROBLEM ANALYSIS

1. IOSTREAM.H- USED FOR INPUT (CIN) AND OUTPUT (COUT) OPERATIONS

2. STRING.H- USED FOR STRING HANDLING

3. CONIO.H- USED FOR clrscr() AND getch() FUNCTIONS

4 | Page
4. STDIO.H- USED FOR STANDARD I/O OPERATIONS

HARDWARE AND SOFTWARE REQUIREMENTS

SOFTWARE:-

1. TURBO C++ - FOR THE PROGRAM


2. WINDOWS OS
3. MICROSOFT WORD 2010- FOR PRESENTATION OF PROJECT

HARDWARE:-

1. PRINTER USED FOR PRINTING OF THE PROJECT


2. RAM- 2GB
3. SYSTEM TYPE- 32 BIT OS ,X64 BASED PROCESSOR
4. PROCESSOR- INTEL(R)ATOM(TM) CPU Z3735F @ 1.33GHZ

5 | Page
FUTURE ENHANCHMENT OF QUIZZES

THE MAIN AIM OF OUR PROJECT IS CREATE A GOOD INTERACTION BETWEEN THE STUDENT
AND TEACHER.
1. WE ARE TRYING TO DO THE PROJECT AT BEST LEVEL TO SATISFY ALL THE END USERS
(I.E, STUDENT/FACULTY).
2. IN OUR FUTURE WE ARE DECIDED TO PROVIDE MORE SECURITY TO OUR WEBSITE WHICH
MAY NOT BE HACKED.
3. AND WE GIVE THE CHOICE TO STUDENT TO ADD THEIR NAME UNDER THE FACULTY WHO
THEY WISH AND GET ADVICE FOR THEIR BETTERMENT.
4. IT WILL BE MORE EMPOWERING.

6 | Page
SOURCE CODE
#include<iostream.h>
#include<conio.h>
#include<string.h>
#include<process.h>
void main()
{
clrscr();
long double amount;
amount=100;
int total=0;
int option,l,i,n,a[10],b[10],c[10],d[10],e[10],f[10],g[10];
char ch,name[20],place[25],e_mail[25];
cout<<" WELCOME TO kaiyil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
getch();
clrscr();
cout<<" kaiyil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
cout<<"\nBefore starting we would like to know some informatios about you";
cout<<"\n";
cout<<"\nName:";
cin.getline(name,25);
cout<<"\nPlace:";
cin.getline(place,25);
cout<<"\nYour email id:";
cin.getline(e_mail,25);
getch();
clrscr();
cout<<" kayil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
cout<<"\n"<<name<<" you have Rs."<<amount<<" in your hand";
cout<<"\nAnd it depends on how you play to get this money";
cout<<"\nHere are the rules:";
cout<<"\n1)you will be having 7 questions";
cout<<"\n2)Questions one to three you will have 4 options";
cout<<"\n3)questions four to six you will have 3 options";
cout<<"\n4)questions number seven will have 2 options and his decides your fate";
cout<<"\n5)you are suppposed to keep keep particular amounts in the the options as you
belive that is right";
cout<<"\n6)from questions one to three you are allowed either to keep the amount in one
option or in three of them";
cout<<"\n7)you are allowed to change the amount only once through out this game just like
an life line";
cout<<"\n";
cout<<"\nPress any key to continue";
getch();
clrscr();
cout<<" kaiyil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
cout<<"\n"<<name<<" you have Rs."<<amount<<" in your hand";
cout<<"\nyour first question which will be having 4 option";
cout<<"\n";
cout<<"\nWho potrayed the titular character in 1992 film 'Chaplin'";
cout<<"\n********************* *********************";
cout<<"\n* OPTION 1 * * OPTION 2 *";
cout<<"\n*Chris Evans * *Sam Wilson *";
cout<<"\n********************* *********************";
cout<<"\n********************* *********************";

7 | Page
cout<<"\n* OPTION 3 * * OPTION 2 *";
cout<<"\n*Robert Downey Jr * *Bruce Willis *";
cout<<"\n********************* *********************";
cout<<"\n ";
cout<<"\naccording to rule number 6 you are allowed to keep the amount in either 3 options
or the whole amount in one option";
cout<<"\enter the desired option";
cout<<"\n1)keeping the amount in 3 option";
cout<<"\n2)keeping the whole amount in an single option";
cout<<"\nenter the option::";
cin>>option;
if(option==1)
{
n=4;
cout<<" you are allowed to put the amount in only three options and the option which you
believe is wrong is to be kept blank and the sum of their amount\n should be "<<amount;
for(i=1;i<=n;++i)
{
cout<<"\nEnter the amount "<<name<<" which you desired to keep in the option no "<<i
<<"and\n the total amount is to be kept is "<<amount<<"::";
cin>>a[i];
amount=amount-a[i];
}
total=total+a[1];
}
if(option==2)
{
cout<<"\nYou have decided to keep the whole amount in a single option";
cout<<"\nIn which option have you decided to keep the whole amount::";
cin>>a[i];
if(a[i]==3)
{
total=100;
}
}
cout<<"\n Its time for top or drop";
cout<<"\nthe right answer is "<<"Option 3 Robert Downey Jr";
if(a[3]>1||a[i]==3)
{
cout<<"\nYOU are right";
cout<<"\nand your account is left with amount "<<total;
}
else
{cout<<"\nanswer is wrong";exit(0);
}

if(total==0)
{
cout<<"you are out of the game since you have amount as Rs.0";
cout<<"\ndont worry keep on playing";
}
if(total<0||total>100)
{cout<<"\nyou have enter the amount incorrectely"; }
getch();
if(a[1]>0||a[i]==1)
{
amount=total;
clrscr();
cout<<" kaiyil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
cout<<"\n"<<name<<" you have Rs."<<total<<" in your hand";
cout<<"\nyour second question which will be having 4 option";
cout<<"\n";
cout<<"\nWhich footballer had scored 500 club goals for Barcelona?";
cout<<"\n********************* *********************";
cout<<"\n* OPTION 1 * * OPTION 2 *";

8 | Page
cout<<"\n* Luis Enrique * * Lionel Messi *";
cout<<"\n********************* *********************";
cout<<"\n********************* *********************";
cout<<"\n* OPTION 3 * * OPTION 4 *";
cout<<"\n* Pep Guardiola * * Neymar *";
cout<<"\n********************* *********************";
cout<<"\n ";
cout<<"\naccording to rule number 6 you are allowed to keep the amount in either 3 options
or the whole amount in one option";
cout<<"\enter the desired option";
cout<<"\n1)keeping the amount in 3 option";
cout<<"\n2)keeping the whole amount in an single option";
cout<<"\nenter the option::";
cin>>option;
if(option==1)
{
n=4;
cout<<" you are allowed to put the amount in only three options and the option which you
believe is wrong is to be kept blank and the sum of their amount\n should be "<<amount;
for(i=1;i<=n;++i)
{
cout<<"\nEnter the amount "<<name<<" which you desired to keep in the option no "<<i <<"and
\nthe total amount is to be dkept is "<<amount<<":";
cin>>b[i];
amount=amount-b[i];
}
total=amount+b[3];
}
if(option==2)
{
cout<<"\nYou have decided to keep the whole amount in a single option";
cout<<"\nIn which option have you decided to keep the whole amount::";
cin>>b[i];
if(b[i]==2)
{
total;
}
}
cout<<"\n Its time for top or drop";
cout<<"\nthe right answer is "<<"Option (3)Lionel Messi ";
if(b[3]>1||b[i]==3)
{
cout<<"\nYOU are right";
cout<<"\nand your account is left with amount "<<total;
}
else
{cout<<"\nanswer is wrong"; exit(0);
}

if(total==0)
{
cout<<"you are out of the game since you have amount as Rs.0";
cout<<"\ndont worry keep on playing";
}
if(total<0||total>100)
{cout<<"\nyou have enter the amount incorrectely"; }
getch();}

if(b[3]>10||b[i]==3)
{
amount=total;
clrscr();
cout<<" kaiyil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
cout<<"\n"<<name<<" you have Rs."<<total<<" in your hand";

9 | Page
cout<<"\nyour third question which will be having 4 option";
cout<<"\n";
cout<<"\nWhich cartoon duo had won 7 Oscars for best animated feature;
cout<<"\n********************* *********************";
cout<<"\n* OPTION 1 * * OPTION 2 *";
cout<<"\n* Popeye&Bruno * * Micky Mouse&Frnds*";
cout<<"\n********************* *********************";
cout<<"\n********************* *********************";
cout<<"\n* OPTION 3 * * OPTION 4 *";
cout<<"\n* Looney tunes * * Tom&Jerry *";
cout<<"\n********************* *********************";
cout<<"\n ";
cout<<"\naccording to rule number 6 you are allowed to keep the amount in either 3 options
or the whole amount in one option";
cout<<"\enter the desired option";
cout<<"\n1)keeping the amount in 3 option";
cout<<"\n2)keeping the whole amount in an single option";
cout<<"\nenter the option";
cin>>option;
if(option==1)
{
n=4;
cout<<" you are allowed to put the amount in only three options and the option which you
believe is wrong is to be kept blank and the sum of their amount should\n be "<<amount;
for(i=1;i<=n;++i)
{
cout<<"\nEnter the amount "<<name<<" which you desired to keep in the option no "<<i <<"and
\nthe total amount is to be dkept is "<<amount<<":";
cin>>c[i];
amount=amount-c[i];
}
total=amount+c[4];
}
if(option==2)
{
cout<<"\nYou have decided to keep the whole amount in a single option";
cout<<"\nIn which option have you decided to keep the whole amount::";
cin>>c[i];
if(c[i]==4)
{
total;
}
}
cout<<"\n Its time for top or drop";
cout<<"\nthe right answer is "<<"Option (4)Tom&Jerry";
if(c[4]>1||c[i]==4)
{
cout<<"\nYOU are right";
cout<<"\nand your account is left with amount "<<total;
}
else
{cout<<"\nanswer is wrong"; exit(0);
}

if(total==0)
{
cout<<"you are out of the game since you have amount as Rs.0";
cout<<"\ndont worry keep on playing";
}
if(total<0||total>100)
{cout<<"\nyou have enter the amount incorrectely"; }
getch();}

if(c[4]>1||c[i]==4)
{
amount=total;

10 | P a g e
clrscr();
cout<<" kaiyil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
cout<<"\n"<<name<<" you have Rs."<<total<<" in your hand";
cout<<"\nyour fourth question which will be having 3 option";
cout<<"\n";
cout<<"\nWho was the founder of the Indian NAtional Congress";
cout<<"\n********************* *********************";
cout<<"\n* OPTION 1 * * OPTION 2 *";
cout<<"\n* A O Hume * * Mahatma Gandhi *";
cout<<"\n********************* *********************";
cout<<"\n********************* ";
cout<<"\n* OPTION 3 * ";
cout<<"\n* W C Banerjee * ";
cout<<"\n********************* " ;
cout<<"\n ";
cout<<"\naccording to rule number 6 you are allowed to keep the amount in either 3 options
or the whole amount in one option";
cout<<"\enter the desired option";
cout<<"\n1)keeping the amount in 2 option";
cout<<"\n2)keeping the whole amount in an single option";
cout<<"\nenter the option";
cin>>option;
if(option==1)
{
n=3;
cout<<" you are allowed to put the amount in only three options and the option which you
believe is wrong is to be kept blank and the sum of their amount \nshould be"<<amount;
for(i=1;i<=n;++i)
{
cout<<"\nEnter the amount "<<name<<" which you desired to keep in the option no "<<i <<"and
\nthe total amount is to be kept is "<<amount<<":";
cin>>d[i];
amount=amount-d[i];
}
total=amount+d[1];
}
if(option==2)
{
cout<<"\nYou have decided to keep the whole amount in a single option";
cout<<"\nIn which option have you decided to keep the whole amount::";
cin>>d[i];
if(d[i]==1)
{
total;
}
}
cout<<"\n Its time for top or drop";
cout<<"\nthe right answer is "<<"Option (1)A O HUME";
if(d[1]>1||d[i]==1)
{
cout<<"\nYOU are right";
cout<<"\nand your account is left with amount "<<total;
}
else
{cout<<"\nanswer is wrong"; exit(0);
}

if(total==0)
{
cout<<"you are out of the game since you have amount as Rs.0";
cout<<"\ndont worry keep on playing";
}
if(total<0||total>100)
{cout<<"\nyou have enter the amount incorrectely"; }
getch();}

11 | P a g e
if(d[1]>1||d[i]==1)
{
amount=total;
clrscr();
cout<<" kaiyil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
cout<<"\n"<<name<<" you have Rs."<<total<<" in your hand";
cout<<"\nyour fith question which will be having 3 option";
cout<<"\n";
cout<<"\nWhich is known as 'The Roof of the World'";
cout<<"\n********************* *********************";
cout<<"\n* OPTION 1 * * OPTION 2 *";
cout<<"\n* Tibet * * Alps *";
cout<<"\n********************* *********************";
cout<<"\n*********************";
cout<<"\n* OPTION 3 * ";
cout<<"\n* Himalayas *";
cout<<"\n********************* ";
cout<<"\n ";
cout<<"\naccording to rule number 6 you are allowed to keep the amount in either 3 options
or the whole amount in one option";
cout<<"\enter the desired option";
cout<<"\n1)keeping the amount in 2 option";
cout<<"\n2)keeping the whole amount in an single option";
cout<<"\nenter the option::";
cin>>option;
if(option==1)
{
n=3;
cout<<" you are allowed to put the amount in only two options and the option which you
believe is wrong is to be kept blank and the sum of their amount \nshould be "<<amount;
for(i=1;i<=n;++i)
{
cout<<"\nEnter the amount "<<name<<" which you desired to keep in the option no "<<i <<"and
\nthe total amount is to be dkept is "<<amount<<":";
cin>>e[i];
amount=amount-e[i];
}
total=amount+e[2];
}
if(option==2)
{
cout<<"\nYou have decided to keep the whole amount in a single option";
cout<<"\nIn which option have you decided to keep the whole amount::";
cin>>e[i];
if(e[i]==1)
{
total;
}
}
cout<<"\n Its time for top or drop";
cout<<"\nthe right answer is "<<"Option (1)Tibet";
if(e[1]>1||e[i]==1)
{
cout<<"\nYOU are right";
cout<<"\nand your account is left with amount "<<total;
}
else
{cout<<"\nanswer is wrong";exit(0);
}

if(total==0)
{
cout<<"you are out of the game since you have amount as Rs.0";
cout<<"\ndont worry keep on playing";
}

12 | P a g e
if(total<0||total>100)
{cout<<"\nyou have enter the amount incorrectely"; }
getch();}
if(e[1]>1||e[i]==1)
{
amount=total;
clrscr();
cout<<" kaiyil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
cout<<"\n"<<name<<" you have Rs."<<total<<" in your hand";
cout<<"\nyour sixth question which will be having 3 option";
cout<<"\n";
cout<<"\nA person elected as a member of the HOUSE OF THE PEOPLE(Lok Sabha) must be";
cout<<"\n********************* *********************";
cout<<"\n* OPTION 1 * * OPTION 2 *";
cout<<"\n* 25 years * * 30 years *";
cout<<"\n********************* *********************";
cout<<"\n*********************";
cout<<"\n* OPTION 3 * ";
cout<<"\n* 35 years * ";
cout<<"\n********************* ";
cout<<"\n ";
cout<<"\naccording to rule number 6 you are allowed to keep the amount in either 3 options
or the whole amount in one option";
cout<<"\enter the desired option";
cout<<"\n1)keeping the amount in 2 option";
cout<<"\n2)keeping the whole amount in an single option";
cout<<"\nenter the option::";
cin>>option;
if(option==1)
{
n=3;
cout<<" you are allowed to put the amount in only two options and the option which you
believe is wrong is to be kept blank and the sum of their amount\n should be "<<amount;
for(i=1;i<=n;++i)
{
cout<<"\nEnter the amount "<<name<<" which you desired to keep in the option no "<<i <<"and
\nthe total amount is to be dkept is "<<amount<<":";
cin>>f[i];
amount=amount-f[i];
}
total=amount+f[1];
}
if(option==2)
{
cout<<"\nYou have decided to keep the whole amount in a single option";
cout<<"\nIn which option have you decided to keep the whole amount::";
cin>>f[i];
if(f[i]==1)
{
total;
}
}
cout<<"\n Its time for top or drop";
cout<<"\nthe right answer is "<<"Option 1 25 years";
if(f[1]>1||f[i]==1)
{
cout<<"\nYOU are right";
cout<<"\nand your account is left with amount "<<total;
}
else
{cout<<"\nanswer is wrong";exit(0);
}

if(total==0)
{

13 | P a g e
cout<<"you are out of the game since you have amount as Rs.0";
cout<<"\ndont worry keep on playing";
}
if(total<0||total>100)
{cout<<"\nyou have enter the amount incorrectely"; }
getch();}
if(f[1]>1||f[i]==1)
{
amount=total;
clrscr();
cout<<" kaiyil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
cout<<"\n"<<name<<" you have Rs."<<total<<" in your hand";
cout<<"\nyour seventh and last question which will be having only option";
cout<<"\n";
cout<<"\nWhich wicketkkeper has the highest no. of dismissals in IPL?";
cout<<"\n********************* *********************";
cout<<"\n* OPTION 1 * * OPTION 2 *";
cout<<"\n* D.Karthik * * MS Dhoni *";
cout<<"\n********************* *********************";
cout<<"\n";
cout<<"\nAs it is the last question you could only use one of the options above";

cout<<"\nIn which option have you decided to keep the whole amount";
cin>>g[i];
if(g[i]==1)
{
total;
}
}
cout<<"\n Its time for top or drop";
cout<<"\nthe right answer is "<<"Option 1 Dusk";
if(g[1]>1||g[i]==1)
{
cout<<"\nYOU are right";
cout<<"\nand your account is left with amount "<<total;
}
else
{cout<<"\nanswer is wrong"; exit(0);
}

if(total==0)
{
cout<<"you are out of the game since you have amount as Rs.0";
cout<<"\ndont worry keep on playing";
}
if(total<0||total>100)
{cout<<"\nyou have enter the amount incorrectely"; }
getch();
if(g[1]>1||g[i]==1)
{
amount=total;
clrscr();
cout<<" kaiyil oru kodi are you ready";
cout<<"\n *-*-*-*-*-*-*-*-*-*-*-*-*-*-*";
cout<<"CONGRATS!!!!!!!!!!!!!!!!!!!! "<<name<<" you have won "<<amount;
cout<<name<<" from "<<place<<" have won Rs."<<amount <<" which will be sent via your
emailid "<<e_mail<< "later ";
}
getch();}

14 | P a g e
SCREENSHOTS

1. ENTERING THE DETAILS:

2. RULES OF THE GAME

15 | P a g e
3. QUESTIONS AND ANSWERS

16 | P a g e
17 | P a g e
(THE USER HAS UNDERTAKEN OPTION 1 AS A MEANS OF CHOOSING ANS.)

18 | P a g e
4. WINNING THE GAME

19 | P a g e
5. LOSING THE GAME IN THE THREE SCENARIOS

20 | P a g e
(GIVING THE WRONG ANSWER TO QUESTIONS 4-7 WILL EXIT FROM THE PROGRAM)

21 | P a g e
BIBLIOGRAPHY

1. COMPUTER SCIENCE WITH C++ - BY SUMITHA ARORA


2. www.google.com

22 | P a g e
23 | P a g e