Return finishup output end of

  • ECPI University
  • CIS 121
  • Rebmoo9847
  • 4
  • 93% (15) 14 out of 15 people found this document helpful

This preview shows page 3 - 4 out of 4 pages.

salesQuarter3LastYear + salesQuarter4LastYearreturnfinishUp()output "End of report"returnStartDeclarationsstring CarTypestring InvalidCarTypenum Daysnum STD_RATE = 65num COM_RATE = 40num SUB_RATE = 30
num DAYS_FOR_DISCOUNT = 7num DISCOUNT_RATE = 0.20string QUIT = "ZZZZ"string End_Line = “End of program.”Housekeeping()while CarType <> QUITdetailLoop()endwhilefinish()stopHousekeeping()output "Enter car type or ", QUIT, " to quit "input CarTypereturndetailLoop()output "Enter days rented "input Daysif CarType = "Standard" thenrate = STD_RATEelseif Car_Type = "Compact" thenrate = COM_RATEelseif CarType = "Subcompact" thenrate = SUB_RATEelserate = 0output "Invalid car type”endifendifendifif rate <> 0if days >= DAYS_FOR_DISCOUNT thenrate = rate - rate * DISCOUNT_RATEendifendifoutput CarType, daysoutput "Enter car type or ", QUIT, " to quit "input CarTypereturnfinish()output "End of program"return

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture