DEBUG04-03_CIS121_JOHNSONA.txt - This pseudocode should...

This preview shows page 1 out of 1 page.

// This pseudocode should detrmine 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() return getReady() output "Enter car type or ", QUIT, " to quit " input carType return detailLoop() output "Enter days rented "

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture