Airplane ticket application ( Version #1)


#include
#include
#define SIZE 50

void fget(void);
void eget(void);
void bget(void);

int a=1;
int b=50;
int c=100;

int main(int argc, char *argv[])
{
    int choice;
      
    while(1)
 
   {
 
   printf("\t\t\t\twellcome to V Airline\n\n");
 
   printf("Your options are:\n\n");
   printf("For a First Class ticket enter 1 \n");
   printf("For a Business Class ticket enter 2 \n");
   printf("For an Economy Class ticket enter 3 \n");
   printf("For exiting enter 0 \n\n");

   scanf("%d",&choice);

   printf("\n\n");

   if (choice==0) return 0;

   else if (choice==1)  { fget(); a++ ;}
 
   else if (choice==2)  { bget(); b++; }
 
    else if (choice==3)  { eget(); c++; }
   }

  system("PAUSE");
  return 0;
}


void fget(void)
{
int i;

i=a;

int eseat[SIZE];

eseat[i]=i;

printf("Your ticket number is %d\n\n",eseat[i]);

}

void bget(void)
{
int i;

i=b;

int eseat[SIZE];

eseat[i]=i;

printf("Your ticket number is %d\n\n",eseat[i]);

}

void eget(void)
{
int i;

i=c;

int eseat[SIZE];

eseat[i]=i;

printf("Your ticket number is %d\n\n",eseat[i]);

}