title: If I want to store the user input in an array in Risc-v,how do I store the values and compare it
body: <p>If I want to store the user input in an array in risc-v,how do I store the values and compare it </p>
  
  <p>for example in mips I can do it like:</p>
  
  <pre><code>addi $t1,$v0,0
  sw $t1,array($t0)
  addi $t0,$t0,4
  </code></pre>
  
  <p>and then compare it like:</p>
  
  <pre><code>lw $t2,array($t3)
  beqz $t2,label # if t2 = 0 then go to label
  addi $t3,$t3,4 
  </code></pre>