Question: below is given code .data str1: .asciiz Please enter a number: .text .globl main main: # Start program addi $s1, $zero, 0 # s1

below is given code .data str1: .asciiz "Please enter a number: "below is given code

.data str1: .asciiz "Please enter a number: " .text .globl main main: # Start program addi $s1, $zero, 0 # s1 is ouput value addi $s0, $zero, 4 # s0 is loop counter inputs: # Request some user input: li $v0, 4 la $a0, str1 syscall # Read some user input: li $v0, 5 syscall # Do some arithmetic: add $s1, $s1, $v0 # Handle loop control flow: addi $s0, $s0, -1 bne $s0, $zero, inputs # read more inputs when count is not zero # Pring output li $v0, 1 addi $a0, $s1, 0 syscall # Exit program li $v0, 10 syscall

C. Modify prob3.s to print the evaluation of a*b+c where a, b, and c are three values entered by the user. Provide three test cases (inputs and observed output) showing your code works. Submit your new program as prob3_.S

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 Databases Questions!