title: C To MIPS - translate a simple code
body: <pre><code>int i;
  void set_array(int num) {
      for (i=0; i&lt;10;i++) {
          A[i] = compare(num,i);
      }
  }
  
  int compare (int a, int b) {
      if ((a-b) &gt;= 0)
          return 1;
      else return 0
  }
  </code></pre>
  
  <p>Getting some problems here.</p>
  
  <p>My major problem is: how can you insert the compare(num,i) to A[i]?</p>
  
  <p>By the way, I'm totally beginner in this, so sorry if it seems too easy to be asked.</p>