C++ Project on Kon Banega Crorepati (KBC) Quiz Computer Science C++ Project for class 12 & 11
Description : In this program / project , simple concepts of c++ are used to achieve the goal,
it is easy to understand
Click Here To View
Leave us your FeedBack
Tell about us to your Friends
i m 11th class student.. hving c++ in subjects ..
ReplyDeletewhat if we wannna add subjects like computer ..maths..science.. nd according tht we add questions to program ... how to do tht?by the hlp of do while? i mean how? m still cnfused.. plz hlp me..
you have to use switch statement in which for each choice is having an specific code like for example, you give computer as 1, Maths as 2 and so on.
DeleteSo for every different choice of subject the program will jump to specific set of questions.
Now you also need a flag variable which is initially having TRUE value, when our player will give a wrong answer then that flag variable will turn to FALSE.
now put the whole SWITCH statement in a Do-While loop whit condition inside the while bracket as your flag variable.
So general format for your code will become like this:
do
{
swith(choice)
{
case 1:
.
.
case 2:
.
.
.
.
.
}
}
while(flag);
I hope you have understood the concept well,
Still if you have any doubt then feel free to ask here, .... We are here to only help you.