Posted by **steve** on Thursday, December 1, 2011 at 12:03pm.

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

- programming - java -
**MathMate**, Thursday, December 1, 2011 at 6:34pm
I don't see a pseudocode, but will be glad to comment/critique if you supply one.

- programming -
**Moe**, Monday, January 30, 2012 at 1:03pm
// This pseudocode should determine 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

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"

string carType

num days

num rate

num discount

num totalFee

getReady()

while carType != QUIT

detailLoop()

endwhile

finish()

stop

getReady()

output "Enter car type or ", QUIT, " to quit "

input carType

return

detailLoop()

rate = 0

days = 0

discount = 0

minFee = 200

output "Enter days rented "

input days

if carType = "Standard" then

rate = STD_RATE

if carType = "Compact" then

rate = COM_RATE

if carType = "Subcompact" then

rate = SUB_RATE

if rate = 0 then

errorInvalidCarType()

if days >= DAYS_FOR_DISCOUNT then

discount = (rate * days) * DISCOUNT_RATE

totalFee = (rate * days) – discount

output “Rental fees for car is: $”, totalFee

getReady()

return

errorInvalidCarType()

output "Invalid car type, use Standard, Compact, or Subcompact"

getReady()

return

finish()

output "End of program"

return

- programming -
**Moe**, Monday, January 30, 2012 at 1:21pm
Can someone tell me if i did this right?

## Answer This Question

## Related Questions

- math problem/break even point - Hondas rent for $25 per day and $.24 (24 cents) ...
- Algebra - A couple wishes to rent a car for one day while on vacation. Ford Auto...
- Math - The cost of renting a car from Rent-it Cheap for one day is $29 plus 50 ...
- Algebra - You pay $1 to rent a movie plus an additional $0.50 per day until you ...
- College Algebra - A couple wants to rent a car for one day while on vacation. ...
- Math - Hello, I need to use matrices in order to solve this problem but I am ...
- Problem solving - A rental car agency charges $15 per day plus $.11 per mile to...
- Problem solving - A rental car agency charges $15 per day plus $.11 per mile to...
- Math - A rental car agency charges $15 per day plus $.11 per mile to rent a ...
- Math - Hello, I need to use a matrix to solve this but am stumped on how to do ...

More Related Questions