title: Assembly using BEQ? (I use MIPS)
body: <p>extremely newbie coder here, especially to assembly language and I'm in need of some help. I'm afraid.</p>
  
  <p>Basically I have to write a program of a basic 4 function calculator and use conditional statements.</p>
  
  <p>Is BEQ even considered a conditional statement? lol.. </p>
  
  <p>The display looks like this</p>
  
  <pre><code>Welcome to the 4 function calculator
  1 - Addition
  2 - Sub
  3 - Mult
  4 - Div
  9 - Exit
  </code></pre>
  
  <p>If you push 1 then this is the sample output</p>
  
  <pre><code>1
  Please enter a number: 3
  Please enter a number: 4
  Please enter a number: 5
  The sum of 3, 4, and 5 is 12
  
  Welcome to the 4 function calculator
  1 - Addition
  2 - Sub
  3 - Mult
  4 - Div
  9 - Exit
  </code></pre>
  
  <p>So that's the basic skeleton of what's supposed to happen.</p>
  
  <p>I KNOW how to get it using beq, the only part I'm struggling with is the error msgs to throw in.</p>
  
  <p>what function or the phrase do I use if the numbers aren't 1, 2 ,3 ,4 or 9?<br>
  I'm not sure if it's possible so now I'm not sure if I can actually use beq
  What I would need to make it work would be like in c++ <code>else if (x != 1 &amp;&amp; x != 2 &amp;&amp; x != 3 &amp;&amp; x != 4 &amp;&amp; x != 9)</code>  or something along those lines...  I'm not sure how to code all that into assembly as I'm not even sure you can use that many variables in 1 line of coding without having an error.</p>
  
  <p>If I can't use BEQ then what other possibilities can I use?</p>
  
  <p>I was thinking about bgt and blt but it seems to weird to have to use it if the range is only 1 number  ex bgt 0 blt 2 would mean the input has to be 1.  </p>
  
  <p>Any help at all would be greatly appreciated.</p>
  
  <p>Edit:  Just read about bne ... which would mean the program would have to read all 5 bne's before displaying the error.</p>