Question: Here is a sample of the input and output: Input: 5 2 7 8 3 1 9 9 4 Output: 4 3 1 5 2
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 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
