Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribedbelow 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

Understand the different approaches to job design. page 167

Answered: 1 week ago