Question: Instructions: Read the problem statement. Formulate the algorithm using pseudocode and top - down, step - wise refinement. Document the flowchart Show me the steps

Instructions:
Read the problem statement.
Formulate the algorithm using pseudocode and top-down, step-wise refinement.
Document the flowchart
Show me the steps to Write the C program.
Show me how to complete the for loop to get it running right.
Show me how to achieve the sample run.
(Parking Charges) A parking garage charges a $5.00 minimum fee to park for up to two hours and an additional $1.50 per hour for each hour or part thereof over the two hours (The maximum charge (for 48-hour period or more), is $75.00). Write a program that calculates and prints the parking charges for each of four customers who parked their cars in this garage yesterday. You should enter the hours parked for each customer. Your program should print the results and should calculate and print the total of yesterday's receipts. The program should use the function calculateCharges to determine the charge for each customer.
Remember the Input, process, output model. Look at what the input should be, what the process is, and what the output should be. Use the code examples in the book and our week 1 lab to understand how to code the input, process, and output. First go into the problem statements above and highlight what needs to be done. Remember chapter 3, the decomposition and using stepwise analysis when developing an algorithm/pseudo code. You will create one function in this program.
Pseudo code:
Create function prototype for calculating charges (hint: pass in hours)
Prompt user to "Enter the hours parked for 4 cars: "
Declare need variables
Set up for loop
Declare a variable to hold hours
Accept input for hours entered by user
Add hours entered to total hours accumulator variable
Print table column headers (Cars Hours Charge)
Calculate current car's charge and update total by calling function
Add current charge to total charge accumulator variable
Display data for current car (car number, current hours, current charges)
End for loop
Display row data for totals
End of main
Create function calculateCharges to return charge according to number of hours
Create pseudo code here. Be sure to submit pseudo code with your submission
End program
Test Data:
Car Hours Charge
11.55.00
22.05.00
347.974.00
449.075.00
Total 100.4159.00
SAMPLE RUN :
Enter the hours parked for 4 cars:
Enter the hours parked for car: 1=1.5
Car Hours Charge
11.55.00
Enter the hours parked for car: 2=2.0
Car Hours Charge
22.05.00
Enter the hours parked for car: 3=47.9
Car Hours Charge
347.974.00
Enter the hours parked for car: 4=49
Car Hours Charge
449.075.00
Hours Charge
Total 100.4159.00
.....Program finished with exit code 0
Press ENTER to exit console.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!