Answer:
sum of odd integers from 0 to n
Step-by-step explanation:
#addi- add immediately
begin: addi $t0,$zero,0 #add $zero and 0,result stores in $t0
#addi - add immediately
#add $zero and 1,result stores in $t1
# $t1 = 0 + 1
addi $t1,$zero,1
#slt - set if less than
# if $a0 < $t1,set 1 to $t2
loop: slt $t2,$a0,$t1
#bne- branch for not equal
#if $t2 != 0,jump to label finish
bne $t2,$zero,finish
#add $t0 and $t1,result stores in $t0
# $t0 = $t0 + $t1
add $t0,$t0,$t1
#add immediately
#add $t1 and 2,result stores in $t2
# $t1 = $t1 + 2
addi $t1,$t1,2
# j - unconditional jump to given label
j loop
#add $t0 and 0,result stores in $v0
# $v0 = $t0 + 0
finish : add $v0,$t0,$zero