Ticket Type Determination
1.0s 256MAn airline’s ticket type rules for passengers are as follows:
- If a passenger’s age is at least \(65\), they must purchase a senior discount ticket
- If a passenger’s age is less than \(12\) but greater than \(3\), they must purchase a children ticket
- If a passenger’s age is at most \(3\), they must purchase an infant ticket
- If a passenger’s age is between \(12\) and \(64\) inclusive, they must purchase a regular ticket
Now, given a passenger’s age, determine which ticket type they must purchase.
Input
The input consists of a single integer \(x\) (\(1 \le x \le 100\)), representing the passenger’s age.
Output
If the passenger must purchase a senior discount ticket, output senior discount ticket; if they must purchase a children ticket, output children ticket; if they must purchase an infant ticket, output infant ticket; if they must purchase a regular ticket, output regular ticket.
Sample Input 1
3
Sample Output 1
infant ticket
Sample Input 2
12
Sample Output 2
regular ticket
Sample Input 3
73
Sample Output 3
senior discount ticket
Sample Input 4
65
Sample Output 4
senior discount ticket
Log in to write and submit code. Creating an account is free.