Answered step by step
Verified Expert Solution
Question
1 Approved Answer
help with this algorithm problem solve it by Pseint: A car rental company wants to develop a simulator to calculate the price for a car
help with this algorithm problem solve it by Pseint:
A car rental company wants to develop a simulator to calculate the price for a car rental. The company offers two types of cars: economy (E) and luxury (L). The rental price is based on the type of car and the number of days you want to rent the car. Create an algorithm that asks the user for the type of car E or L and the number of rental days, and do the following:
Let him calculate and print the price of the car rental, considering that the daily rate is 745 pesos for an "economy" type car and 1140 pesos for a "luxury" type car. The company establishes a minimum of two rental days, so
-the program must validate this data and display a message to the user in case this condition is not met. (20 points).
-For luxury type cars that are rented for more than five days, an additional damage insurance charge of 7% of the rental price must be added.
The program must calculate this charge and add it to the total (20 points).
-The program must allow the user to repeat the calculation of the amount to pay for the rent as many times as he wants, until he indicates that he wants to finish. (10 points).
Example 1:
Auto Type: E
Rental days: 6
Rent price: 6 x 745 = 4470
Damage insurance: 0
Total to pay: 4470 pesos.
Example 2:
Auto Type: Deluxe
Rental days: 6
Rent price: 6 x 1140 = 6840
Damage insurance: 478.8
Total to pay: 7318.8 pesos.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started