Answer:
Step-by-step explanation:
The code for the given problem is written below
.data
A : .word 1 2 3 4 5 6 7 8 9 10
.text
la $s5,A
li $s1,0 # load g
li $s2,10 # load h
li $s3,0 # load i
li $s4,1 # load j
loop:
mul $s6,$s3,4
add $s6,$s6,$s5 #address of A[i]
lw $s6,($s6) #get value of A[i] in s3
add $s1,$s1,$s6 #g = g+A[i]
add $s3,$s3,$s4 # i = i+j
bne $s3,$s2,loop #if i!=h jump to loop