我正在試圖用遞歸找到兩個數字的GCD。 這段代碼是我迄今爲止所做的,但顯然它進入了一個無限循環,我無法理解爲什麼以及如何解決這個問題。 我將不勝感激一些幫助 .data
string1: .asciiz "Enter the first number: "
string2: .asciiz "Enter the second number: "
string3: .asciiz "GCD i
b我不太確定它爲什麼不讀取輸入並決定重複或結束..這裏是我的代碼,幫助將不勝感激! .data
again:
.asciiz "Again (y or n)? "
answer:
.asciiz " "
.text
.globl main
main:
li $v0, 4
la $a0, again
syscall
l