Random number homework
<p>Here is the question:</p>

<blockquote>
  <p>Write a function named getTwoRandomNumbers that uses two parameters to return two different random numbers. The function also accepts two parameters that specify the minimum and maximum values of the random number. You will need to write data validation code that ensures that two identical random numbers will never be returned.</p>
</blockquote>

<p>Here is the code I got so far:</p>

<pre><code>float getTwoRandomNumbers (int Min, int Max, int &amp; number1, int &amp; number2);

void main()
{



  getTwoRandomNumbers (int Min, int Max, int &amp; number1, int &amp; number2)
  cout &lt;&lt; "The two random numbers are " &lt;&lt; getTwoRandomNumbers &lt;&lt; endl;



}

float getTwoRandomNumbers (int Min, int Max, int &amp; number1, int &amp; number2)

{

       int loopNumber, number;      

       for (loopNumber = 0; loopNumber &lt;= 200 ; loopNumber ++)

       { 
       number = rand(); 


       if (loopNumber &lt; 100 &amp;&amp; number &gt;= Min &amp;&amp; number &lt;= Max)
       {

              number1 = number;
       }


       if (loopNumber &gt; 100 &amp;&amp; number &gt;= Min &amp;&amp; number &lt;= Max)
       {
              number2 = number;
       }
       return number2;
       }

}
</code></pre>

<p>I am trying to write this as simple as possible if anyone can do that would be wonderful.</p>
