Page 392 - C++
P. 392

char t1[5] ;
         int t2, valid, sno ;
         do
         {
         valid = 1 ;
         gotoxy(3,23);
         cout <<"                                                 ";
         gotoxy(3,23);
         cout <<"PRESS <ENTER> TO EXIT" ;
         gotoxy(3,20);
         cout <<"                                                                " ;
                         "                                            ";
         gotoxy(3,20);
         cout<< "Enter Sno. of the FLIGHT for which all passanger"
                         " records to be deleted: ";
         gets (t1) ;
         t2 = atoi(t1);
         sno = t2 ;
         if (strlen(t1) == 0)
         return ;
         if (sno < 1 || sno > 12)
         {
         valid = 0 ;
         gotoxy(3,23) ;
         cout <<"                                                  "  ;
         gotoxy(3,23) ;
         cout <<"\7 ENTER CORRECTLY" ;
         getch() ;
         }
         } while (!valid) ;
         gotoxy (3,23 ) ;
         if (!DELETE_FLIGHT(sno))
         cout <<"\7 Records not found. Press any key to continue. .." ;
         else
         cout <<"\7 Records deleted. Press any key to continue. .." ;
         getch() ;
         }
         //---------------------------------------------------------------------------
         // THIS IS MAIN FUNCTION WHICH DISPLAY MENU AND CALLS ALL
         //THE MAIN FUNCTIONS
         //---------------------------------------------------------------------------
         void main(void)
         {
         PASSANGER p ;
         TICKET ticket ;
         RESERVE r ;
         ticket.ADDITION() ;
         char ch ;
         while (1)
         {
         clrscr() ;
         textcolor(WHITE) ;
         textbackground(BLUE) ;
         for (int i=7; i<=19; i++)
         for (int j=20; j<=61; j++)
         {
         gotoxy(j,i) ;
         printf ( " " ) ;
         }
         gotoxy(29,9) ;
         printf("AIR TICKET RESERVATION") ;
         gotoxy(29,10) ;
         cprintf(" ~~~~~~~~~~~~~~~~~~~~~ ") ;
         gotoxy(30,11) ;
   387   388   389   390   391   392   393   394   395   396   397