title: Divide integers and print out the result as a float in MIPS Assembly
body: <p>I am working on an assignment that reads in integers and puts them into an array until a negative one is entered. I have to find the mean of the integers but the results must be printed out as a float. I've tried several ways of doing this but so far when i run it on QTSpim, the result says 'nan'. </p>
  
  <p>Here is the portion of my code </p>
  
  <pre><code>mfc1 $t6, $f1 #t6 is the sum
  cvt.s.w $f1, $f1 
  mfc1 $t7, $f2 #t7 is the number of ints
  cvt.s.w $f2, $f2  
  div.s $f0, $f1, $f2
  mov.s $f12, $f0
  li $v0, 2
  syscall 
  </code></pre>