Jothi's Neengalum Velalaam Oru Kodi In C++

#include<iostream.h>
#include<conio.h>
void main(void)
{
char name[50],ques[11];
int s;
clrscr();
    do
      {
      s=0;
      cout<<"\n Welcome to NVOK!";
      cout<<"\n Enter ur Name";
      cin>>name;
      cout<<"\n Enter answer in form of 'a','b',and 'c' only";
      cout<<"\n Q1.Who is Called the Father of History?";
      cout<<"\n a.Herodotus";
      cout<<"\n b.Jothi";
      cout<<"\n c.Vinoth";
      cin>>ques[1];
   if(ques[1]='a')
      {
      s=s+1;
      cout<<"\n Good job!!";
      cout<<"\n Your Score is:"<<s;
      }
      else
      {
      cout<<"Sorry!!!";
      goto z;
      }
clrscr();
cout<<"WELCOME TO NVOK!";
cout<<"U Entered into the Next Question!!Congrajulations,"<<name<<"Shall we move on???";
cout<<"\n Enter answer in form of 'a','b',and 'c' only";
      cout<<"\n Q2.Who is Called the Father of History?";
      cout<<"\n a.Herodotus";
      cout<<"\n b.Jothi";
      cout<<"\n c.Vinoth";
      cin>>ques[2];
   if(ques[2]='a')
      {
      s=s+1;
      cout<<"\n Good job!!";
      cout<<"\n Your Score is:"<<s;
      }
      else
      {
      cout<<"Sorry!!!";
      goto z;
      }
clrscr();
clrscr();
cout<<"WELCOME TO NVOK!";
cout<<"U Entered into the Next Question!!Congrajulations,"<<name<<"Shall we move on???";
cout<<"\n Enter answer in form of 'a','b',and 'c' only";
      cout<<"\n Q3.Who is Called the Father of History?";
      cout<<"\n a.Herodotus";
      cout<<"\n b.Jothi";
      cout<<"\n c.Vinoth";
      cin>>ques[3];
   if(ques[3]='a')
      {
      s=s+1;
      cout<<"\n Good job!!";
      cout<<"\n Your Score is:"<<s;
      }
      else
      {
      cout<<"Sorry!!!";
      goto z;
      }
clrscr();
clrscr();
cout<<"WELCOME TO NVOK!";
cout<<"U Entered into the Next Question!!Congrajulations,"<<name<<"Shall we move on???";
cout<<"\n Enter answer in form of 'a','b',and 'c' only";
      cout<<"\n Q4.Who is Called the Father of History?";
      cout<<"\n a.Herodotus";
      cout<<"\n b.Jothi";
      cout<<"\n c.Vinoth";
      cin>>ques[4];
   if(ques[4]='a')
      {
      s=s+1;
      cout<<"\n Good job!!";
      cout<<"\n Your Score is:"<<s;
      }
      else
      {
      cout<<"Sorry!!!";
      goto z;
      }
clrscr();
clrscr();
cout<<"WELCOME TO NVOK!";
cout<<"U Entered into the Next Question!!Congrajulations,"<<name<<"Shall we move on???";
cout<<"\n Enter answer in form of 'a','b',and 'c' only";
      cout<<"\n Q5.Who is Called the Father of History?";
      cout<<"\n a.Herodotus";
      cout<<"\n b.Jothi";
      cout<<"\n c.Vinoth";
      cin>>ques[5];
   if(ques[5]='a')
      {
      s=s+1;
      cout<<"\n Good job!!";
      cout<<"\n Your Score is:"<<s;
      }
      else
      {
      cout<<"Sorry!!!";
      goto z;
      }
clrscr();
clrscr();
cout<<"WELCOME TO NVOK!";
cout<<"U Entered into the Next Question!!Congrajulations,"<<name<<"Shall we move on???";
cout<<"\n Enter answer in form of 'a','b',and 'c' only";
      cout<<"\n Q6.Who is Called the Father of History?";
      cout<<"\n a.Herodotus";
      cout<<"\n b.Jothi";
      cout<<"\n c.Vinoth";
      cin>>ques[6];
   if(ques[6]='a')
      {
      s=s+1;
      cout<<"\n Good job!!";
      cout<<"\n Your Score is:"<<s;
      }
      else
      {
      cout<<"Sorry!!!";
      goto z;
      }
clrscr();
clrscr();
cout<<"WELCOME TO NVOK!";
cout<<"U Entered into the Next Question!!Congrajulations,"<<name<<"Shall we move on???";
cout<<"\n Enter answer in form of 'a','b',and 'c' only";
      cout<<"\n Q7.Who is Called the Father of History?";
      cout<<"\n a.Herodotus";
      cout<<"\n b.Jothi";
      cout<<"\n c.Vinoth";
      cin>>ques[7];
   if(ques[7]='a')
      {
      s=s+1;
      cout<<"\n Good job!!";
      cout<<"\n Your Score is:"<<s;
      }
      else
      {
      cout<<"Sorry!!!";
      goto z;
      }
clrscr();
clrscr();
cout<<"WELCOME TO NVOK!";
cout<<"U Entered into the Next Question!!Congrajulations,"<<name<<"Shall we move on???";
cout<<"\n Enter answer in form of 'a','b',and 'c' only";
      cout<<"\n Q8.Who is Called the Father of History?";
      cout<<"\n a.Herodotus";
      cout<<"\n b.Jothi";
      cout<<"\n c.Vinoth";
      cin>>ques[8];
   if(ques[8]='a')
      {
      s=s+1;
      cout<<"\n Good job!!";
      cout<<"\n Your Score is:"<<s;
      }
      else
      {
      cout<<"Sorry!!!";
      goto z;
      }
clrscr();
clrscr();
cout<<"WELCOME TO NVOK!";
cout<<"U Entered into the Next Question!!Congrajulations,"<<name<<"Shall we move on???";
cout<<"\n Enter answer in form of 'a','b',and 'c' only";
      cout<<"\n Q9.Who is Called the Father of History?";
      cout<<"\n a.Herodotus";
      cout<<"\n b.Jothi";
      cout<<"\n c.Vinoth";
      cin>>ques[9];
   if(ques[9]='a')
      {
      s=s+1;
      cout<<"\n Good job!!";
      cout<<"\n Your Score is:"<<s;
      }
      else
      {
      cout<<"Sorry!!!";
      goto z;
      }
clrscr();
clrscr();
cout<<"WELCOME TO NVOK!";
cout<<"U Entered into the Next Question!!Congrajulations,"<<name<<"Shall we move on???";
cout<<"\n Enter answer in form of 'a','b',and 'c' only";
      cout<<"\n Q10.Who is Called the Father of History?";
      cout<<"\n a.Herodotus";
      cout<<"\n b.Jothi";
      cout<<"\n c.Vinoth";
      cin>>ques[10];
   if(ques[10]='a')
      {
      s=s+1;
      cout<<"\n Good job!!";
      cout<<"\n Your Score is:"<<s;
      }
      else
      {
      cout<<"Sorry!!!";
      goto z;
      }
  z:
  if(s==10)
   {
   cout<<"\n No Cheating!!"<<name<<"!!";
   break;
   }
  if(s==9)
   {
   cout<<"\n"<<name<<"you are very intelligent!!";
   cout<<"ur score is:9";
   }
   if(s==8)
   {
   cout<<"\n"<<name<<"u are intelligent!!";
   cout<<"\n your Score is:8";
   }
   if(5==s||s==7||s==6)
   {
   cout<<"\n Better luck next time!!";
   }
   else
   if(s<=4)
   cout<<"u are unfit for all!!";
   cout<<"\n do u want to Continue playing another time(y/n)??";
   cin>>ques[11];
   }
while(ques[11]=='y'||ques[11]=='Y');
getch();
}


No comments:

Post a Comment