title: MIPS - Round Number
body: <p>I am trying to develop the execution of a simple program in MIPS, but I am breaking my head on a topic. How do I get the system to return or show me a rounded number?</p>
  <p><strong>EXAMPLE</strong></p>
  <p>I enter a data number equal to <code>1.876542</code> and I want the system to show me the following:</p>
  <pre><code>The rounded number is: 1.88
  </code></pre>
  <p><strong>CODE</strong></p>
  <pre><code>*.data
  txt1: .asciiz &quot;Enter number: &quot;
  txt2: .asciiz &quot;The rounded number is: &quot;
    
  .text
  li $v0, 4
  la $a0, txt1
  syscall
  li $v0, 6
  syscall
  movf.s $f1, $f0
  .globl begin
  begin
  jal print_roundnumber
  j exit
      
  print_roundnumber:
  li $v0, 4
  la $a0, txt2
  syscall
  movf.s $f12, $f1
  li $v0, 2   
  syscall     
  jr $ra      
  exit:
  li $v0, 10 
  syscall
  </code></pre>