我想知道为什么我得到一个十进制数作为答案。例如,如果我输入2和2答案应该是4,但输出为0.04 .data
msg1: .asciiz "Please enter a number i "
msg2:.asciiz "Please enter a number j "
.text
.globl main
main:
la $a0,msg1 #print message
l
这是我第一次编码PCSPIM。我发现我的代码有点麻烦。 .data
user_input: .asciiz "\n\nEnter an Integer for the value of n: "
result_display: .asciiz "\nThe sum from 0 to n is "
Greeting: .asciiz "\n\nThank you!"
.text