Day_7_HW1_Chap_4_Debug_04-03.docx - Day 7 HW#1 Chap 4 Debug...

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

Day 7 HW#1 Chap 4 Debug 04-03 // This pseudocode should det e rmine the rental fees for cars // Standard cars rent for $65 per day; compacts rent for $40 per day // and subcompacts rent for $30 per day // Rentals for at least 7 days receive a 20% discount // An error message is displayed if the car type is not valid start Declarations string carType num days num STD_RATE = 65 num COM_RATE = 40 num SUB_RATE = 30 num DAYS_FOR_DISCOUNT = 7 num DISCOUNT_RATE = 0.20 string QUIT = "ZZZZ" getReady() while carType <> QUIT detailLoop() endwhile finish() stop getReady() output "Enter car type or", QUIT, "to quit"

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture