A parking garage charges a minimum fee of $2.00 to park forup to 3 hours. The ga
ID: 3615863 • Letter: A
Question
A parking garage charges a minimum fee of $2.00 to park forup to 3 hours. The garage charges an additional $0.50 per hour foreach hour or part thereof in excess of 3 hours. The maximum chargefor any given 24-hour period is $10.00. Assume that no car parksfor longer than 24 hours at a time. Write a program that willcalculate and print the parking charges for each of 3 customers whoparked their cars in this garage yesterday. You should enter thehours parked for each customer. Your program should print theresults in a neat tabular format, and should calculate and printthe total of yesterday's receipts. The program should use thefunction calculateCharges to determine the chargefor each customer. Your outputs should appear in the followingformat:
Car Hours Charge
1 1.5 2.00
2 4.0 2.50
3 24.0 10.00
Total 29.5 14.50
Explanation / Answer
please rate - thanks #include #include #include using namespace std; double calculateCharges(double); int main() {int i; double hours[3], thours=0,charge[3],tcharge=0,portions; cout.setf(ios::fixed,ios::floatfield); cout.precision(2); for(i=0;iRelated Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.