title: How to find out if two numbers are relatively prime?
body: <p>I'm trying to write a method that will calculate if two numbers are relatively prime for an assignment. I'm primarily looking for answers on where to start. I know there is a method <code>gcd()</code> that will do a lot of it for me, but the assignment is pretty much making me do it without gcd or arrays.</p>
  
  <p>I kind of have it started, because I know that I will have to use the <code>%</code> operator in a for loop.</p>
  
  <pre><code>public static boolean relativeNumber(int input4, int input5){
      for(int i = 1; i &lt;= input4; i++)
  </code></pre>
  
  <p>Obviously this method is only going to return <code>true</code> or <code>false</code> because the <code>main</code> function is only going to print a specific line depending on if the two numbers are relatively prime or not.</p>
  
  <p>I'm thinking I will probably have to write two <code>for</code> loops, both for <code>input4</code>, and <code>input5</code>, and possibly some kind of <code>if</code> statement with a logical <code>&amp;&amp;</code> operand, but I'm not sure.</p>