Answered step by step
Verified Expert Solution
Question
1 Approved Answer
A hardware store rents several lawn and garden tools. It charges a minimum fee for up to four hours. The store charges an additional hourly
A hardware store rents several lawn and garden tools. It charges a minimum fee for up to four hours. The store charges an additional hourly fee in excess of four hours. There is a maximum charge for any given 24-hour period. Write a program that calculates and prints the charges for a tool rental. Assume that no tool can be rented longer than 24 hours at a time. The user should enter the tool selection, enter the hours rented fora customer, and print the charge. Tool Stump grinder Self-Propelled Lawnmower$21 Sod Cutter Handheld blower 4-hour (minimum) |Hourly rate Maximum per day $68 $8 $3 $10 $2 $150 S50 $180 S38 $72 $14 A sample input/output: Please select from the following menu: 1. Stump grinder 2 Self-Propelled lawnmower, 3. Sod cutter, 4. Handheld blower. Enter tool selection 1 Enterhours rented: 6 Amount due (): 84 1. Name your program tools.c 2. Your program should validate the tool selection. If the selection is not in the range of 1 to 4, print a message and exit the program
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