Sunrise Freight charges standard - Sunrise Freight charges...

This preview shows page 1 - 2 out of 2 pages.

// Sunrise Freight charges standard // per-pound shipping prices to the five states they serve // –- IL IN OH MI WI // -- 0.60 0.55 0.70 0.65 0.67 // Modify this program to reduce its size // by using arrays start Declarations string state num pounds num price[5] = 0.60, 0.55, 0.70, 0.65, 0.67 string state[5] = IL, IN, OH, MI, WI string foundIt string BAD_STATE_MSG = "Sorry, we do not ship to ” string FINISH = “XXX” getReady() while state <> FINISH findPrice() endwhile finishUp() stop getReady() output "Enter state or ", FINISH, " to quit" input state return findPrice() foundIt = "N" if state = "IL" then price = 0.60

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture