Prime b

Prime b

  • NA
  • 810
  • 339.3k

Loop question please help

Jan 7 2012 2:51 PM
Th e Whippet Bus Company charges prices for tickets based
on distance traveled, as shown in the accompanying table.
Distance (miles) Ticket Price ($)
0 – 99              25.00
100 – 299         40.00
300 – 499         55.00
500 and farther  70.00
Write a program that allows a user to enter a trip distance.
Th e output is the ticket price


My question is how do i represent distance? cause it has number range so i am not really sure how to use array here

Answers (8)