22. Ticket Price by Age
Foundation1000 ms256 MBSolved by 0%
A cinema charges by age:
| Age | Price | | --- | --- | | Under 5 | 0 | | 5 to 17 | 80 | | 18 to 59 | 150 | | 60 and above | 100 |
Read an age and print the price.
Constraints - `0 ≤ age ≤ 120`
Input
A single line containing one integer n.
Output
Print one integer, the ticket price.
Input10
Output80
Noteis a child
Input30
Output150
Noteis an adult
Hints
Four rungs, in order. The last two open once you have submitted an attempt. A wrong one counts.
Hint 1Where to start
Hint 2The approachOpen hint 1 first. This one carries on from it.
Hint 3PseudocodeOpen hint 2 first. This one carries on from it.
Hint 4Full solutionOpen hint 3 first. This one carries on from it.