Code:
#include <stdio.h>
char option;
void PURCHASE(), VIEW(), QUIT();
void BUSINESS(), ECONOMY();
void main(){
printf("AIRLINE RESERVATION SYSTEM \n");
printf("P - to Purchase Ticket \n");
printf("V - to View Arrangement \n");
printf("Q - to Quit the system \n");
printf("Enter the option : ");
scanf_s("%c", &option);
getchar();
switch(option){
case '1':
case 'P':
case 'p':
printf("Purchase\n");
//PURCHASE();
break;
case '2':
case 'V':
case 'v':
printf("View\n");
//VIEW();
break;
case '3':
case 'Q':
case 'q':
printf("Quit\n");
//QUIT();
break;
default:
printf("Invalid Option \n");
break;
}
}
Please help me see what is the problem, no matter that character or number I entered, the program also display Invalid Option.