Sign in to run tests against edge cases and save your code automatically.
Problem Description
Easy
Ticket Price by Age
PROSelection & Logic
Selection & Logic
A museum charges different ticket prices depending on a visitor's age.
- Under 5: 0
- 5 to 15 (inclusive): 5
- 16 to 64 (inclusive): 12
- 65 and over: 7
Write a program that inputs the visitor's age as an integer and outputs the ticket price as a whole number.
Example Input
10
Example Output
5
Success Rate:
0% (0 passed / 0 attempted)
Code
Draft auto-saved
Test Results
Click "Test Code" to evaluate your code against the tests.