Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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: " .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_Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started