int n = prompt; double m = n/2; sum = 1; for (int i = 2; i <= m; i++) if (div(i,n)) sum += i; if (sum == n) return 1; else return 0;
this is what i have on the conversion so far, help me if i am wrong.
move $s0, $zero
for1tst:slt $t0, $s0, $a1
beq $t0, $zero, exit1
bne $s3, $s4, nxline
nxline: bne $s5, $s6
addi $s0, $s0, 1
j for1tst
exit1:

New Topic/Question
Reply




MultiQuote




|