write a program that takes in a string that holds the values day or night and an
Fantastic news! We've Found the answer you've been seeking!
Question:
write a program that takes in a string that holds the values "day" or "night" and an integer that holds a person's age, and outputs a movie ticket price. Movie prices are free for everyone under the age of 4. Daytime prices are $8 for everyone age 4 or higher. Nighttime prices are $12 for ages 4 - 16, $15 for ages 17 - 54 and $13 for ages 55 and above.
Ex: If the input is:
night 50
the output is:
$15
Ex: If the input is:
day 15
the output is:
$8
Ex: If the input is:
night 3
the output is:
free
Related Book For
Introduction To Programming In Java An Interdisciplinary Approach
ISBN: 9780672337840
2nd Edition
Authors: Robert Sedgewick, Kevin Wayne
Posted Date: