Matching numbers
<p>I'm trying to finish a homework assignment and I can't find this anywhere. I'm trying to match input numbers with randomly generated numbers and displaying how many of the 5 are correct (also with a win/lose message). This is what I have so far and any help would be appreciated.</p>

<pre><code>#include &lt;iostream&gt;
#include &lt;cstdlib&gt;
using namespace std;

void main()
{
    //variables
    int lottery[5], user[5];
    int count = 0;
    int num1, num2, num3, num4, num5;
    int winnum;
    //generating numbers
    for (int i=0; i &lt;5; i++)
    {
        lottery[i] =1+rand()%9;
    }
    //input
    cout &lt;&lt; "Enter a digit between 0-9: ";
    cin &gt;&gt; num1;
    // ...
    cin &gt;&gt; num5;

    winnum = rand();

    //display
    cout &lt;&lt; "Winning Lottery Numbers: " &lt;&lt; winnum &lt;&lt; endl;
    cout &lt;&lt; "Your ticket Numbers: " 
         &lt;&lt; num1 &lt;&lt; num2 &lt;&lt; num3 &lt;&lt; num4 &lt;&lt; num5 &lt;&lt; endl;

    //matching the numbers
    //HELP!
    system("pause");
}
</code></pre>
