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 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 the decomposition and using stepwise analysis when developing an algorithmpseudo 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 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:
COSC Lab: 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
Total
SAMPLE RUN :
Enter the hours parked for cars:
Enter the hours parked for car:
Car Hours Charge
Enter the hours parked for car:
Car Hours Charge
Enter the hours parked for car:
Car Hours Charge
Enter the hours parked for car:
Car Hours Charge
Hours Charge
Total
Program finished with exit code
Press ENTER to exit console.
How do I write up a code that completes the sample run?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
