Acarrentalcompanyusesthefollowingtabletohelpcomputerentalfees. TABLE 9.3 Car Type Chevrolet Corvette Pontiac Buick Oldsmobile Cadillac Rate per Day 50.00 85.00 53.00 60.00 60.00 70.00 Rate per Mile 0.27 0.45 0.32 0.32 0.35 0.40 Write a program to calculate car rental fees based on this table. The program should prompt the user to enter the name of the type of car that was rented, the number of days the car was rented, and the number of miles the car was driven. The program should search the table for a match on the car type. If there is a match, the rental fee is the number of days rented, times the rate per day, plus the number of miles traveled, times the rate per mile. The program should display the type of car, the number of days rented, the number of miles driven, and the rental fee. If the table search cannot find the car type in the table, display an appropriate-ate error message. Write the program to process any number of rentals.

2 answers

`Twas brillig, and the slithy toves
Did gyre and gimble in the wabe:
All mimsy were the borogoves,
And the mome raths outgrabe.
"Beware the Jabberwock, my son!
The jaws that bite, the claws that catch!
Beware the Jubjub bird, and shun
The frumious Bandersnatch!"
He took his vorpal sword in hand Long time the manxome foe he sought --
So rested he by the Tumtum tree, And stood awhile in thought.
And, as in uffish thought he stood, The Jabberwock, with eyes of flame, Came whiffling through the tulgey wood, And burbled as it came!
Sorry about the formatting. I meant to say

`Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe. "Beware the Jabberwock, my son! The jaws that bite, the claws that catch! Beware the Jubjub bird, and shun The frumious Bandersnatch!" He took his vorpal sword in hand Long time the manxome foe he sought -- So rested he by the Tumtum tree, And stood awhile in thought. And, as in uffish thought he stood, The Jabberwock, with eyes of flame, Came whiffling through the tulgey wood, And burbled as it came! One, two! One, two! And through and through The vorpal blade went snicker-snack! He left it dead, and with its head He went galumphing back. "And, has thou slain the Jabberwock? Come to my arms, my beamish boy! O frabjous day! Callooh! Callay!' He chortled in his joy. `Twas brillig, and the slithy toves Did gyre and gimble in the wabe; All mimsy were the borogoves, And the mome raths outgrabe.