3. A truck rental company charges a flat rate of $19.95 per day plus $0.79 per mile driven. If the price is over $100, t
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
3. A truck rental company charges a flat rate of $19.95 per day plus $0.79 per mile driven. If the price is over $100, t
company charges a flat rate of $19.95 per day plus $0.79 per mile driven. If the price is over $100, the company provides a $10 discount. Write a program for the truck rental company that does the following: a. Ask the customer how many miles they expect to drive, and store their answer in a variable **Hint: You need to cast the user's input into something that can be calculated. b. Using their answer, compute how much the customer will owe based on the pricing explained above. C. If their rental price is over $100, apply the discount by subtracting $10 from their price. d. Print out how much the customer's rental will cost with a $ in front of it. **Hint: You will need to concatenate 'S' with the rental price cast to a string
3. A truck rental