Anda di halaman 1dari 34

Name- Ashutosh Malla

Class- 12th D
RollNo.-9
Subject-Computer
Topic Quiz Competition

Miss Nishtha Khanna


Teacher, Computer
Delhi Public School, Jammu

Principal
DPS, Jammu

Certificate
This is to certify that Ashutosh Malla, student of
Class XII D, Delhi
Public School has completed the
project titled Quiz Competition during the academic
year 2014-2014 towards partial fulfilment of credit for
the Computer Science Project evaluation of CBSE 201415, and submitted a satisfactory report, as compiled in
the following pages, under professional supervision of
Miss. Nishtha Khanna

ACKNOWLEDGEMENT
I, Ashutosh Malla of class XII D, am highly grateful to
Ms. Nishtha Khanna for her untiring help and
encouragement during the course of project titled c+

+ quiz competetion. I highly acknowledge, with


deepest sense of gratitude and indebtedness, her great
coordination and support throughout the course of
work. I would also like to express my gratitude to my
family, who were always there to help and motivate
me.

CONTENTS
INTRODUCTION

MINIMUM HARDWARE AND


SOFTWARE REQUIREMENTS
SYNOPSIS
HEADER FILES
SOURCE CODE
SCREENSHOTS

SYNOPSIS
INTRODUCTION
The main objective of this application is to provide its users with
an opportunity to play the famous quizzing game at the comfort
of their homes on a computer system.

MINIMUM
SOFTWARE
REQUIREMENTS

HARDWARE
AND

Windows XP
A keyboard
1 GB hard disk
1GB Ram
Printer to print
Nvidia GTX560g video memory
HEADER FILES USED ARE:-

Filename
IOSTREAM.H

Description
For i/o handling

CONIO.H

Used to create text based UIs

STDIO.H

Provides functions with standard i/o


capabilities.

SOURC
E CODE

/
*====================/*=======================================
===============================================*/

/*********************** QUIZ CONTEST **************************

/
*============================================================
==========================*/
//**********************************BY ASHUTOSH MALLA*************************************//

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
int main()
{ char name[100],option,sol ;
int x=0,correct=0, wrong=0;
clrscr();

char join;
mainhome:
cout<<"\n\t!! !! !! !!!!!! !!
cout<<"\n\t!! !! !! !!

!!

cout<<"\n\t!! !! !! !!!!!! !!
cout<<"\n\t!! !! !! !!

!!

!!!!!! !!!!!! !!!!!!!!!! !!!!!! ";


!!
!!
!!

!! !! !! !! !! !!

";

!! !! !! !! !! !!!!!! ";
!! !! !! !! !! !!

";

cout<<"\n\t!!!!!!!!!! !!!!!! !!!!! !!!!!! !!!!!! !! !! !! !!!!!! ";


cout<<"\n\t=====================================================
========\n";
cout<<"\n\t\t\t***************** ***********";
cout<<"\n\t\t\t

***

***

***";

cout<<"\n\t\t\t

***

***

***";

cout<<"\n\t\t\t

***

***

***";

cout<<"\n\t\t\t

***

***

***";

cout<<"\n\t\t\t

***

***

***";

cout<<"\n\t\t\t

***

***********";

cout<<"\n\t\t\t===============================\n";
cout<<"\n

####### ## ## ######## ########";

cout<<"\n

##

# ## ##

##

cout<<"\n

##

# ## ##

##

##";
##";

cout<<"\n

## ## ## ##

##

##";

cout<<"\n

##### # ####### ######## ########";

cout<<"\n======================================================
==============";
cout<<"\n\t\t\t PRESS ANY KEY TO CONTINUE ";
getch();
clrscr();
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"

Register your name:- ";

cin>>name;

clrscr();
cout<<"\n *****************************************************************";
cout<<"\n

WELCOME "<<name ;

cout<<"\n *****************************************************************";
cout<<"\n
cout<<"\n
cout<<"\n
cout<<"\n ";

________________________________";
M E N U ";
________________________________";

cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n
cout<<"\n

1. Start QUIZ ";


2. help

cout<<"\n

";

3. About Us";

cout<<"\n

4. Exit ";

cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n Press the option no. of your choice ";

option=(getch());
if(option=='4')
{

clrscr();
cout<<"

############ GOOD BYEE!! ##############";

return 0;
}
if(option=='3')
{

clrscr();

printf("\n

");
printf("\n

printf("\n

");
");

printf("\n

printf("\n

printf("\n
printf("\n
printf("\n

printf("\n

printf("\n

printf("\n

printf("\n

printf("\n

");

___________________
/ THIS PROGRAM
/ HAS BEEN

");

/ DESIGNED AND
/ COMPILLED BY

");
/

");

");

/ ASHUTOSH MALLA /

");

/ OF CLASS 12th D /
/ ROLL NO. 9

");

");

/------------------/

");

printf("\n

");

printf("\n

");

printf("\n

");

");

printf("\n
");
return 0;
}
if(option=='2')
{

clrscr();
printf("\n\n

$$$Here are some tips you might wanna know before playing:$$$");

printf("\n -------------------------------------------------------------------------");
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";
cout<<"\n ";

printf("\n

1.>> You will be given 4 options for each question..");

printf("\n

2.>> Try to give the correct answers for each questions..");

printf("\n

3.>> Correct answer will give you 4 marks..");

printf("\n

4.>> Negative marking of 1 mark for wrong answers..");


return 0;

}
if(option=='1')
{

clrscr();
printf("\n

. '@(@@@@@@@)@. (@@) ` . '(Developed by Ashutosh Malla)

printf("\n

. @@'((@@@@@@@@@@@)@@@@@)@@@@@@@)@

printf("\n

@@(@@@@@@@@@@))@@@@@@@@@@@@@@@@)@@` .

");
");

");
printf("\n @.((@@@@@@@)(@@@@@@@@@@@@@@))@\@@@@@@@@@)@@@ .
");
printf("\n (@@@@@@@@@@@@@@@@@@)@@@@@@@@@@@\\@@)@@@@@@@@)
");
printf("\n(@@@@@@@@)@@@@@@@@@@@@@(@@@@@@@@//@@@@@@@@@) `
");
printf("\n .@(@@@@)##&&&&&(@@@@@@@@)::_=(@\\@@@@)@@ . .'
");
printf("\n @@`(@@)###&&&&&!!;;;;;;::-_=@@\\@)@`@.
printf("\n ` @@(@###&&&&!!;;;;;::-=_=@.@\\@@
printf("\n
printf("\n
printf("\n
printf("\n
printf("\n
printf("\n
printf("\n

(LET'S BEGIN)

'

");

` @.#####&&&!!;;;::=-_= .@ \\
####&&&!!;;::=_-

");

");

###&&!!;;:-_=
##&&!;::_=
##&&!;:=
##&&!:#&!;:-

");
");
");
");

PRESS ANY KEY TO START THE QUIZ!!!!!!!!");

");

printf("\n

#&!;=

printf("\n

#&!-

printf("\n

#&=

printf("\n

#&-

printf("\n

\\#/'

");
");
");
");
");

printf("\n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^");
getch();
clrscr();

}
else
clrscr();
printf("\n

. '@(@@@@@@@)@. (@@) ` . '(Developed by Ashutosh Malla)

printf("\n

. @@'((@@@@@@@@@@@)@@@@@)@@@@@@@)@

printf("\n

@@(@@@@@@@@@@))@@@@@@@@@@@@@@@@)@@` .

");
");

");
printf("\n @.((@@@@@@@)(@@@@@@@@@@@@@@))@\@@@@@@@@@)@@@ .
");
printf("\n (@@@@@@@@@@@@@@@@@@)@@@@@@@@@@@\\@@)@@@@@@@@)
");
printf("\n(@@@@@@@@)@@@@@@@@@@@@@(@@@@@@@@//@@@@@@@@@) `
");
printf("\n .@(@@@@)##&&&&&(@@@@@@@@)::_=(@\\@@@@)@@ . .'
");
printf("\n @@`(@@)###&&&&&!!;;;;;;::-_=@@\\@)@`@.
printf("\n ` @@(@###&&&&!!;;;;;::-=_=@.@\\@@
printf("\n
printf("\n
printf("\n
printf("\n

(LET'S BEGIN)

'

");

` @.#####&&&!!;;;::=-_= .@ \\
####&&&!!;;::=_###&&!!;;:-_=
##&&!;::_=

");

");
");
");

");

printf("\n

##&&!;:=

printf("\n

");

##&&!:-

");

printf("\n

#&!;:-

PRESS ANY KEY TO START THE QUIZ!!!!!!!!");

printf("\n

#&!;=

");

printf("\n

#&!-

printf("\n

#&=

printf("\n

#&-

printf("\n

\\#/'

");
");
");
");

printf("\n
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^");

clrscr();

//Ques 1 starts
here_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
***************************
cout<<"Ques1.

Lunar eclipse occurs on. ?"<<endl;

printf("\n");
cout<<"

1. A new moon day"<<endl;

cout<<"

2. A full moon day"<<endl;

cout<<"

3. A half moon day"<<endl;

cout<<"
4. both 1 and
2"<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"

sol=(getch());
if(sol=='2')
{ correct++;
x=x+4;

Press the correct option:."<<endl;

clrscr();
cout<<"

Good Job.";

cout<<" Your score is: "<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"


PRESS ANY KEY TO GET NEXT QUESTION"<<endl;

}
else
{wrong++;
clrscr();
cout<<"

Sorry wrong answer."<<endl<<endl<<endl<<endl<<endl;

x=x-1;
cout<<"
The right answer is:-A full moon day
"<<endl<<endl<<endl<<endl<<endl;
cout<<" Your score is:
"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"
PRESS ANY KEY TO GET NEXT QUESTION";

}
getch();
clrscr();
//Ques 1
ends_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
************************

//Ques 2 starts
here_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
***************************
cout<<"Ques2.

Detroit in the U. S. A. is known as the city of ?"<<endl;

printf("\n");
cout<<"

1. Motor Car"<<endl;

cout<<"

2. Lights"<<endl;

cout<<"

3. Aeroplanes"<<endl;

cout<<"

4. Rockets"<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;

cout<<"

Press the correct option:."<<endl;

sol=(getch());
if(sol=='1')
{ correct++;
x=x+4;
clrscr();
cout<<"

Good Job.";

cout<<" Your score is: "<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"


PRESS ANY KEY TO GET NEXT QUESTION"<<endl;

}
else
{wrong++;
clrscr();
cout<<"

Sorry wrong answer."<<endl<<endl<<endl<<endl<<endl;

x=x-1;
cout<<"
The right answer is:-Motor Car
"<<endl<<endl<<endl<<endl<<endl;
cout<<" Your score is:
"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"
PRESS ANY KEY TO GET NEXT QUESTION";

}
getch();
clrscr();

//Ques 2
ends_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
************************

//Ques 3 starts
here_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
***************************
cout<<"Ques3.At which of the following place Rajiv Gandhi died of human bomb
explosion ?"<<endl;
printf("\n");
cout<<"

1. New Delhi"<<endl;

cout<<"

2. Chennai"<<endl;

cout<<"

3. Sriperumbudur"<<endl;

cout<<"

4. Colombo"<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;

cout<<"

Press the correct option:."<<endl;

sol=(getch());
if(sol=='3')
{ correct++;
x=x+4;
clrscr();
cout<<"

Good Job.";

cout<<" Your score is: "<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"


PRESS ANY KEY TO GET NEXT QUESTION"<<endl;

}
else
{

wrong++;

clrscr();
cout<<"

Sorry wrong answer."<<endl<<endl<<endl<<endl<<endl;

x=x-1;
cout<<"
The right answer is:-Sriperumbudur
"<<endl<<endl<<endl<<endl<<endl;
cout<<" Your score is:
"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"
PRESS ANY KEY TO GET NEXT QUESTION";

}
getch();
clrscr();
//Ques 3
ends_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
************************

//Ques 4 starts
here_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
***************************
cout<<"Ques4. Polythene is industrially prepared by the polymerization of ?"<<endl;
printf("\n");
cout<<"

1. Methane"<<endl;

cout<<"

2. Styrene"<<endl;

cout<<"

3. Acetylene"<<endl;

cout<<"

4. Ethylene"<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;

cout<<"

sol=(getch());
if(sol=='4')
{ correct++;
x=x+4;

Press the correct option:."<<endl;

clrscr();
cout<<"

Good Job.";

cout<<" Your score is: "<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"


PRESS ANY KEY TO GET NEXT QUESTION"<<endl;

}
else
{
wrong++;

clrscr();
cout<<"

Sorry wrong answer."<<endl<<endl<<endl<<endl<<endl;

x=x-1;
cout<<"
The right answer is:-Ethylene
"<<endl<<endl<<endl<<endl<<endl;
cout<<" Your score is:
"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"
PRESS ANY KEY TO GET NEXT QUESTION";

}
getch();
clrscr();
//Ques 4
ends_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
************************

//Ques 5 starts
here_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
***************************
cout<<"Ques5.

Which one of the following is a water soluble vitamin ?"<<endl;

printf("\n");
cout<<"

1. Vitamin A"<<endl;

cout<<"

2. Vitamin C"<<endl;

cout<<"

3. Vitamin D"<<endl;

cout<<"

4. Vitamin K"<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;

cout<<"

Press the correct option:."<<endl;

sol=(getch());
if(sol=='2')
{ correct++;
x=x+4;
clrscr();
cout<<"

Good Job.";

cout<<" Your score is: "<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"


PRESS ANY KEY TO GET NEXT QUESTION"<<endl;

}
else
{
wrong++;
clrscr();
cout<<"

Sorry wrong answer."<<endl<<endl<<endl<<endl<<endl;

x=x-1;
cout<<"
The right answer is:-Vitamin C
"<<endl<<endl<<endl<<endl<<endl;
cout<<" Your score is:
"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"
PRESS ANY KEY TO GET NEXT QUESTION";

getch();
clrscr();
//Ques 5
ends_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
************************

//Ques 6 starts
here_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
***************************
cout<<"Ques6.
is ?"<<endl;

The smallest size of a cell which can be seen directly by the eye

printf("\n");
cout<<"

1. One micron"<<endl;

cout<<"

2. 10 Micron"<<endl;

cout<<"

3. 100 Micron"<<endl;

cout<<"
4. 1000
micron"<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"

Press the correct option:."<<endl;

sol=(getch());
if(sol=='3')
{ correct++;
x=x+4;
clrscr();
cout<<"

Good Job.";

cout<<" Your score is: "<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"


PRESS ANY KEY TO GET NEXT QUESTION"<<endl;

}
else

{
wrong++;
clrscr();
cout<<"

Sorry wrong answer."<<endl<<endl<<endl<<endl<<endl;

x=x-1;
cout<<"
The right answer is:- 100 Micron
"<<endl<<endl<<endl<<endl<<endl;
cout<<" Your score is:
"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"
PRESS ANY KEY TO GET NEXT QUESTION";

}
getch();
clrscr();
//Ques 6
ends_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
************************

//Ques 7 starts
here_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
***************************
cout<<"Ques7. Which is regarded as a link between the living and the non-living?"<<endl;
printf("\n");
cout<<"

1. Amoeba"<<endl;

cout<<"

2. Virus"<<endl;

cout<<"

3. Bacteria"<<endl;

cout<<"

4. RNA"<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;

cout<<"

sol=(getch());
if(sol=='2')

Press the correct option:."<<endl;

{ correct++;
x=x+4;
clrscr();
cout<<"

Good Job.";

cout<<" Your score is: "<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"


PRESS ANY KEY TO GET NEXT QUESTION"<<endl;

}
else
{
wrong++;
clrscr();
cout<<"

Sorry wrong answer."<<endl<<endl<<endl<<endl<<endl;

x=x-1;
cout<<"

The right answer is:-Virus"<<endl<<endl<<endl<<endl<<endl;

cout<<" Your score is:


"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"
PRESS ANY KEY TO GET NEXT QUESTION";

}
getch();
clrscr();
//Ques 7
ends_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
************************

//Ques 8 starts
here_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
***************************
cout<<"Ques8. The primary energy for living organisms is ?"<<endl;

printf("\n");
cout<<"

1. Solar energy"<<endl;

cout<<"

2. Chemical energy"<<endl;

cout<<"

3. ATP"<<endl;

cout<<"
4.
Mitochondria"<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"

Press the correct option:."<<endl;

sol=(getch());
if(sol=='1')
{ correct++;
x=x+4;
clrscr();
cout<<"

Good Job.";

cout<<" Your score is: "<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"


PRESS ANY KEY TO GET NEXT QUESTION"<<endl;

}
else
{
wrong++;
clrscr();
cout<<"

Sorry wrong answer."<<endl<<endl<<endl<<endl<<endl;

x=x-1;
cout<<"
The right answer is:-Solar energy
"<<endl<<endl<<endl<<endl<<endl;
cout<<" Your score is:
"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"
PRESS ANY KEY TO GET NEXT QUESTION";

}
getch();
clrscr();
//Ques 8
ends_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
************************

//Ques 9 starts
here_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
***************************
cout<<"Ques9. Renowned sarod and sitar maker - died in Kolkata on January 2,
2010. ?"<<endl;
printf("\n");
cout<<"

1. Ajit Banerjee"<<endl;

cout<<"

2. Nirmal Taluqdar"<<endl;

cout<<"

3. Hemendra Chandra Sen"<<endl;

cout<<"
4. Visesh Mohan
Dey"<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"

Press the correct option:."<<endl;

sol=(getch());
if(sol=='3')
{ correct++;
x=x+4;
clrscr();
cout<<"

Good Job.";

cout<<" Your score is: "<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"


PRESS ANY KEY TO GET NEXT QUESTION"<<endl;

else
{
wrong++;
clrscr();
cout<<"

Sorry wrong answer."<<endl<<endl<<endl<<endl<<endl;

x=x-1;
cout<<"
The right answer is:- Hemendra Chandra Sen
"<<endl<<endl<<endl<<endl<<endl;
cout<<" Your score is:
"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"
PRESS ANY KEY TO GET NEXT QUESTION";

}
getch();
clrscr();
//Ques 9
ends_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
************************

//Ques 10 starts
here_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
***************************
cout<<"Ques10.

IC chips used in computers are usually made of ?"<<endl;

printf("\n");
cout<<"

1. Lead"<<endl;

cout<<"

2. Silicon"<<endl;

cout<<"

3. Gold"<<endl;

cout<<"
4. both 1 and
2"<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl;
cout<<"

Press the correct option:."<<endl;

sol=(getch());
if(sol=='2')
{ correct++;
x=x+4;
clrscr();
cout<<"

Good Job.";

cout<<" Your score is:


"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"HIS WAS THE LAST QUESTION,,PRESS
ANY BUTTON TO CONTINUE"<<endl;

}
else
{
wrong++;
clrscr();
cout<<"

Sorry wrong answer."<<endl<<endl<<endl<<endl<<endl;

x=x-1;
cout<<"
The right answer is:-Silicon
"<<endl<<endl<<endl<<endl<<endl;
cout<<" Your score is:
"<<x<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<endl<<"THIS
WAS THE LAST QUESTION,,PRESS ANY BUTTON TO CONTINUE";

}
getch();
clrscr();
//Ques 10
ends_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+_+******
************************
clrscr();

cout<<"^^^^^^^^^^^^^^^^^^^^^^^Get ready for the


scores^^^^^^^^^^^^^^^^^^^^^^^^^^^"<<endl;
cout<<"You have got "<<correct;
cout<<" answers right ";
cout<<"& "<<wrong;
cout<<" answers wrong!!"<<endl;
cout<<"Your total score is "<<x<<" out of 40";
printf("\n ");
printf("\n ");
printf("\n ");
printf("\n ");
printf("\n ");
printf("\n ");
printf("\n ");
printf("\n################################ THE END
################################## ");

return 0;
}

SCREENS

Anda mungkin juga menyukai