โ Back to If Statements
Question 350
Ticket Price by Age (Input)
Ticket Price by Age (Input)
Read anintcalledagefrom standard input and print the ticket price using an if / else-if chain: under13printsPrice: $5;13through64printsPrice: $10;65or older printsPrice: $7. For the input10the output is: Price: $5
Expected Output:
Price: $5
Topics:
If Statements
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.