I'm trying to get the user input (input=$v0) and then compare it to 10 (10=$t1). If the input is less than ten, I want to print '<'. If the input is greater than ten, I want it to print '>'. I've tried a few different things but for some reason it ends up printing both '<' and '>'. As well as an error reading "program is finished running (dropped off bottom)" Could anyone tell me what it is that I'm doing wrong?
#where values are initialized
addi $t1, $zero, 10 #number for comparison
addi $t1, $zero, 60 #< less than
addi $t2, $zero, 62 #> greater than
#Where things happen
addi $v0, $zero, 5 # syscall 5 is to read integer syscall
syscall #get input from keyboard
blt $v0, $t1, less #go to less if less than 10
bgt $v0, $t1, great #go to great if greater than 10
less: #if input is less than 10
addi $v0, $zero, 11 #print
add $a0, $t1, $zero #copy $v0 to print
syscall #call for print
great: #if input is greater than 10
addi $v0, $zero, 11 #print
add $a0, $t2, $zero #copy $v1 to print
syscall #call for print