#computer the sum of the odd intergers between 7 and 101 (exclusive). Note: it's fine if you computed the sum from #7 to 101 inclusive. Either is acceptable. .data bounds: .word 7, 101 #upper and lower bounds of the summation #static output strings follow str1: .asciiz "The sum of odds between " str2: .asciiz " ... " str3: .asciiz " is " str4: .asciiz "." .text la $s0, bounds #load the bounds array into $t0 lw $s1, 0($s0) #$s1 is our lower bounds lw $s2, 4($s0) #$s2 is our upper bounds addi $s3, $zero, 0 #$s3 is the sum loop: addi $s1, $s1, 2 #add 2 to the lower bounds slt $v0, $s1, $s2 #if lower bounds is less than upper bounds, $s1 = 1 beq $v0, $zero, exit #if $s0 = zero, then we are finished, print results add $s3, $s3, $s1 #add the value in $s1 to our summation j loop #jump back to the beginning of the loop exit: #prints the results li $v0, 4 #prints str1: "The sum of odds between " la $a0, str1 syscall lw $s1, 0($s0) #prints the lower bound li $v0, 1 move $a0, $s1 syscall li $v0, 4 #prints str2: " ... " la $a0, str2 syscall li $v0, 1 #prints the upper bound move $a0, $s2 syscall li $v0, 4 #prints str3: " is " la $a0, str3 syscall li $v0, 1 #prints the summation move $a0, $s3 syscall li $v0, 4 #prints str4: "." la $a0, str4 syscall #end