Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Project
1. Certificate
2. Declaration
3. Acknowledgement
4. Introduction to c++
5. Introduction to Project
6. Codings
7. Outputs
8. Bibliography
This is to certify that the project entitled “QUIZ
GAME” is a record of bonafide work carried out by
“ABC 12th A”.In partial fulfilment of the requirements in
COMPUTER SCIENCE prescribed by CBSE for CBSE
BOARD in the school,New Delhi 110001.
DATE PRINCIPAL
INTERNAL EXTERNAL
EXAMINER EXAMINER
We hereby declare that the project work entitled
“QUIZ GAME“. Submitted ABC, NEW DELHI for the
Subject of “COMPUTER SCIENCE“. Under the guidance
of Mrs. ABC, PGT(COMP Sc.), Is a record of original work
done by us.We further Declare that this project record
or any part of this has not been Submitted elsewhere for
any other class.
DATE MEMBERS
PLACE
We wish to express our sincere thanks to Mr. ABC
Principal,ABCD school Delhi for guiding us to
cause the successful outcome of this project work.
We wish to express our deep & profound sense of
gratitude to our guide/teacher Mrs. ABC,
PGT(COMP Sc.), For her expert help &valuable
guidance, comments and suggestions.
Now that all the necessary theory has been covered, now it is possible to
For a time, C++ had no official standard and was maintained by a defacto
the ISO.
• ...is portable.As one of the most frequently used languages in the world and
as an open language, C++ has a wide range of compilers that run on many
different platforms that support it.Code that exclusively uses C++'s standard
library will run on many platforms with few to no changes.
Quiz game is a very popular General Knowledge Game. The quiz game
increases the IQ knowledge of the player. It is used to check the knowledge
within us.
The provided source code is the simple Quiz game programmed implementing
C language. In this program several question are provided to the player. The
players are provided with 4 options in it. Player is all need to choice the
suitable option from the 4 option available in the screen. The player needs to
type either A, B, C, or D according to the suitable answer provided in it.
The player will score the points with each correct answer provided.
#include<iostream.h>
#include<fstream.h>
#include<ctype.h>
#include<string.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
class quiz
public :
void set1();
void ques1();
void ques2();
void ques3();
void ques4();
void ques5();
void fifty1();
void fifty2();
void fifty3();
void fifty4();
void fifty5();
}s1;
int t=0,flag=0;
char ans[1],w;
fstream f1;
void main()
clrscr();
int n;
char name[30],ch;
fstream f1;
getch();
menu:
clrscr();
cin>>n;
if(n==2)
f1.open("Game.txt",ios::in);
if(!f1)
getch();
goto menu;
}
else
f1.seekg(0);
while(!f1.eof())
f1.get(ch);
cout<<ch;
f1.close();
cout<<"\n\n\nPRESS ENTER";
getch();
goto menu;
else
gets(name);
f1.open("Game.txt",ios::out);
f1<<name<<" ";
getch();
s1.set1();
label:
cout<<"\n\n\t\t\tTHANK YOU FOR USING THIS SOFTWARE\n\t THIS SOFTWARE IS CREATED BY THE
STUDENTS OF K. V. GOLE MARKET.\n\t\t\t\tPLEASE DONT COPY ";
getch();
//******** SET 1
void quiz::set1()
clrscr();
char rs[]="b";
cin>>ans;
t=strcmp(ans,rs);
if(t==0)
clrscr();
cout<<"\n***********************************";
cout<<"\n***********************************";
cout<<"\nHAVE TO GIVE THE CORRECT ANSWER.ANY WRONG ANSWER MEANS YOU ";
cout<<"\nFINISH THE GAME THERE ONLY. "; cout<<"\n******** YOU CAN TAKE ONLY THREE HELP
LINES *********";
getch();
s1.ques1();
else
getch();
//************** QUESTION 1
void quiz::ques1()
clrscr();
char rs[]="a";
cin>>w;
if(w=='Y'|| w=='y')
flag++;
s1.fifty1();
cin>>ans;
t=strcmp(ans,rs);
if(t==0)
pts=1000;
f1<<"\n"<<pts;
f1.close();
getch();
s1.ques2();
else
getch();
void quiz::fifty1()
clrscr();
}
//******** QUESTION 2
void quiz::ques2()
clrscr();
char rs[]="c";
cin>>w;
if(w=='Y'||w=='y')
flag++;
s1.fifty2();
cin>>ans;
t=strcmp(ans,rs);
if(t==0)
pts=2000;
f1.open("Game.txt",ios::app);
f1<<"\n"<<pts;
f1.close();
cout<<"\nPRESS ANY KEY FOR THE NEXT QUESTION ";
getch();
s1.ques3();
else
void quiz::fifty2()
clrscr();
//******Question 3
void quiz::ques3()
clrscr();
char rs[]="a";
cin>>w;
if(w=='Y'||w=='y')
{
flag++;
s1.fifty3(); }
cin>>ans;
t=strcmp(ans,rs);
if(t==0) {
pts=3000;
f1.open("Game.txt",ios::app);
f1<<"\n"<<pts;
f1.close();
getch();
s1.ques4();
else
void quiz::fifty3()
clrscr();
//**********Question 4
void quiz::ques4()
clrscr();
cout<<"\n(a)Golf"<<"\t(b)Baseball";
cout<<"\n(c)Yatch Racing"<<"\t(d)Badminton";
char rs[]="d";
if(flag<3)
flag++;
cin>>w;
if(w=='Y'||w=='y')
flag++;
s1.fifty4();
cin>>ans;
t=strcmp(ans,rs);
if(t==0)
pts=5000;
f1.open("Game.txt",ios::app);
f1<<"\n"<<pts;
f1.close();
getch();
s1.ques5();
else
void quiz::fifty4()
clrscr();
cout<<"\n(a)Golf"<<"\t(d)Badminton";
//Question 5
void quiz::ques5()
clrscr();
cout<<"\n(a)C.Hugyens\t(b)Samuel Colt";
if(flag<3)
cin>>w;
if(w=='Y'||w=='y')
flag++;
s1.fifty5();
cin>>ans;
t=strcmp(ans,rs);
if(t==0)
pts=10000;
f1.open("Game.txt",ios::app);
f1<<"\n"<<pts;
f1.close();
getch();
clrscr();
cout<<"\n\t\t\t**********************************************";
else
void quiz::fifty5()
clrscr();
}
HELP FROM INTERNET