Question: Create an algorithm to calculate the pay for a list of 3 - 5 employees using at least one function called by the main program.
Create an algorithm to calculate the pay for a list of employees using at least one function called by the main program.
Implement the program in a high level language like C C or Java. Use the code in the comments of your program to show it was written in a high level language first.
A loop must be used to read in the per hour salaries which should be stored in consecutive memory locations. I will show how to display more memory locations in the live session.
After reading in all the numbers a function should be called to calculate the pay for each employee. The pay should be displayed in the output window. Each employee will work for hours per week.
Implement the program in MIPSzy Assembly language.
If you write that MIPSzy program in a text editor, you should then paste it into the simulator box in You can run the simulation there to test the code.The input value values should be entered in the input box. Enter the numbers to test separated by spaces. Do not worry about whether they move to another line or not.Input works by placing the value to be read in in memory location and a in memory location If there is no more input a will be placed in memory location Results should be written to memory location which will cause them to be written to the output window.Include a comment at the top of the program with your name and Panther id
Export the file by clicking the More Options button and then Export on the right side. That will paste your program into a small box on the right. Copy and paste that into a text document. Call that document FirstnameLastnameAtxt
I will show how to work with the input output simulation window during the live Zoom session which can be watched in the recording if you miss the live class.
Here is a sample of the input and output:
Input:
Output:
A sample program to show how to manage input and output is as follows. Type a single digit positive integer number in the Input box and run the program.
addi $t $zero, # Output loc
BegLoop:
addi $t $zero, # Input ready?
lw $t$t
beq $t $zero, NoInput
addi $t $zero, # Input loc
lw $t$t
addi $t $zero,
sw $t$t # Output to screen
mul $t $t $t # Times Input
sw $t$t # Output to screen
mul $t $t $t # Times Input
sw $t$t # Output to screen
mul $t $t $t # Times Input
sw $t$t # Output to screen
j BegLoop
NoInput:
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
