Question: . data Str 1 : . asciiz Enter first number Str 2 : . asciiz Enter second number Str 3 : . asciiz Enter operation

.data
Str1: .asciiz Enter first number
Str2: .asciiz Enter second number
Str3: .asciiz Enter operation +,-,*,/
.text
main:
#print string Enter first number
#read integer into $s0
#print string Enter second number
#read integer into $s1
#print string Enter Operation
#read char into $s2+(43),-(45),*(42),/(47)
#if + goto ADD
#if - goto SUB
#if * goto MULT
#if / goto DIV
ADD:
#$s0 add $s1 into $s2
#print integer stored in $s2
#END program
SUB:
#$s0 sub $s1 into $s2
#print integer stored in $s2
#END program
MULT:
#$s0 MULT $s1 into $s2
#print integer stored in $s2
#END program
DIV:
#$s0 DIV $s1 into $s2
#print integer stored in $s2
#END program

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!