#include<iostream>
using namespace std;
int main()
{
int a=0,b=0,c=0,d=0;
char y;
cout<<"Choose the right option from the following question. \n\n";
for(int x=1; x<=3; x++)
{
cout<<x;
cout<<"The colour of sky is_______? \n";
cout<<"\na)whilte\tb)black\nc)blue\t\td)green\n";
cin>>y;
if(y=='a')
a++;
if(y=='b')
b++;
if(y=='c')
c++;
if(y=='d')
d++;
cout<<"\n\n\n";
}
cout<< "option a has been answered "<<a<<" times"<<endl;
cout<< "option b has been answered "<<b<<" times"<<endl;
cout<< "option c has been answered "<<c<<" times"<<endl;
cout<< "option d has been answered "<<d<<" times"<<endl;
cout<<"\n\nThe Right option is \'c\' ";
}
0 comments:
Post a Comment