Question: Examine the pseudocode below. Find all the syntax / or logical errors. Correct the errors. / / This pseudocode should determine and output / /

Examine the pseudocode below. Find all the syntax /or logical errors. Correct the errors.
// This pseudocode should determine and output
// 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 =10
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
input carType
return
detailLoop()
output "Enter days rented "
input days
if carType = "Standard" then
rate = STD_RATE
else
if car_Type = "Compact" then
rate = COMPACT_RATE
else
if carType = "Subcompact" then
rate = SUB_RATE
else
rate =0
output "Invalid car type"
endif
endif
endif
if rate <>0
if days >= DAYS_FOR_DISCOUNT then
rate = rate * DISCOUNT_RATE
endif
output carType, days
output "Enter car type or ", QUIT, " to quit "
input carType
return
finish()
output "End of program"
return
Week7Debug.txtDownload Week7Debug.txt
Create a word document using the Course Template. Download the text file above and copy and paste it into the Course Template to make changes in Word that need to be made. Change the font color to bluefor the changes. When you are done, submit that word document to the dropbox.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!