Question: Pseudo code. Remember the Input, process, output model. Look at what the input should be , what the process is , and what the output

Pseudo code. 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
Program Code:
COSC1420 Lab05: Parking Charges Calculator
Programmer: Enter Student Name
Date: Enter date program written
Place pseudo code here
:'
*include estdiohs /// standard input and output library
finclude
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.
How do I write up a code that completes the sample run?
Pseudo code. Remember the Input, process, output

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!