Page 419 - C++
P. 419

outtextxy(150,275,"BEST OF LUCK TO COMPLETE THE TWENTY ROUNDS.");
               outtextxy(150,315,"HERE, WE START OUR JOURNEY");
               getch();

               clrscr();
               cleardevice();
               char rep;
               char ch1, ch2, ch3;
               int flag=0;
               char arr[4];

               ifstream fp;
               int ctr=0, score=0;
               char str[20][3];
               do
               {
                       cleardevice();
                       int r=rand()%40;   // to generate random no between 0 & 40
                       for(int i=0;wstr[r][i]!='\0';i++)
                       {
                           str[i][0]=wstr[r][i];
                           str[i][1]='\0';
                       }
                       ctr=strlen(wstr[r]);
                       setbkcolor(15);
                       setcolor(12);
                       settextstyle(5,0,3);
                       // *************************************
                       // **  MAKING BOXES FOR SELECTED WORD **
                       // *************************************
                       for(i=0;i<ctr;i++)
                       {
                           rectangle(100+40*i,150,140+40*i,190);
                           delay(300);
                       }
                       // **************************************
                       // **  WRITING SELECTED WORD IN  BOXES **
                       // **************************************
                       for(i=0;i<ctr;i++)
                       {
                           outtextxy(110+40*i,158,str[i]);
                           delay(300);
                       }
                       settextstyle(5,0,2);
                       outtextxy(10,430,"ENTER THE LETTER AT FIRST POSITION: ");
                       cin>>ch1;
                       ch1=toupper(ch1);
                       int temp1=0;
                       // ***************************************
                       // checking in the string the inputed char
                       // ***************************************
                       for(int k=0;str[k][0]!=ch1;k++)
                       {
                           temp1++;  // increase temp1 if letter present
   414   415   416   417   418   419   420   421   422   423   424