Hi, i have written a quiz game on c++, the problem is that when i apply while loop to all the questions, the program does not pass question 1 and terminates, but when i apply while loop to question 1 only, then the question goes to the next question.
here is the program in which i have applied while loop to only question 1. can anyone apply loop to all the question or give me suggestions how to make it run????
#include <iostream>
#include<conio.h>
using namespace std;
int main()
{
int tries=1;
char ch1[200],ch2,ch3,ch4,ch5,ch6,ch7,ch8,ch9,ch10,ch11,ch12,ch13,ch14,ch15,ch16;
cout<<"ENTER YOUR NAME: ";
cin>>ch1;
cout<<"****************************WELCOME TO QUIZ GAME "<<ch1<<"*******************************"<<endl<<endl<<endl;
cout << "NOTE:You have 20 questions to answer and you have 1 extra tries if you answer wrong, and each question carry 1000 points(total of 20000 points.Choose only from a,b,c,d" << endl;
cout<<"*************************** QUIZ STARTS NOW,GOODLUCK**********************************"<<endl;
cout<<endl<<endl<<endl;
cout<<"Q6:MSI stands for"<<endl
<<"a. Medium Scale Integrated Circuits"<<endl
<<"b. Medium System Integrated Circuits"<<endl
<<"c. Medium Scale Intelligent Circuit"<<endl
<<"d. Medium System Intelligent Circuit"<<endl;
2. If the supplied code works then we can't help you. Give us the broken code, what error do you get if any? If not, what is the expected result vs what really happened?