Download presentation
Presentation is loading. Please wait.
Published byLionel Sims Modified over 8 years ago
1
Task to Perform The San Marcos Soccer Association (fictional) is hosting a regional tournament and is utilizing the Texas State soccer fields for the tournament. They will be charging admission based on age as indicated below: Age RangePriceCategory Under 6 free Child 6 through 15$7.50 Youth 16 through 54$15.00 Adult 55 and older$12.00 Senior They will give an additional $2 discount for anyone with a current Texas State ID (students, faculty and staff). (This got them a better price on field rental.) Write a program that asks the user for their age and whether or not they have a valid Texas State ID and then outputs the ticket cost to the screen.
2
Get age Get id_status Age < 6 ? free Age < 16 id_status Age < 54? Youth - 2 youth id_status Adult - 2 Adult Senior - 2 senior Display ticket_price true false This is one way to think of it
3
Get age Get id_status Age < 6 ? child Age < 16 Age < 54? youth id_status Adult subtract 2 senior Display ticket_price true false This is another way to think of it
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.