trying to create a dice game using function c++
<p>i am trying to have a function determine the result</p>

<p>a. If the numbers add up to 5, 7, or 12, then the player wins, and the function should return an indication of this (use some integer to represent a win).
b. If the numbers add up to 2, 4, or 11, then the player loses, and the function should return an indication of this (once again, use an integer).
c. If the numbers add up to anything else, then the game is a draw and the function should say this (by way of an integer).</p>

<p>question, do i need a different func for winner, loser, and draw? </p>

<p>and what how can i return a integer to main to let main know that if we have a winner a loser a draw.</p>

<p>just learning to program any help would be greatly appreciated</p>

<pre><code> //function
 int outcome(int, int)
    {
    int die1;
    int die2;
    int winner;
    int loser;
    int draw;

      if (die1&amp;&amp;die2==5||7||12)

      return 99;

      if (die1&amp;&amp;die2==2||4||11)

      return loser;

      else
      return draw;
      }



    // func to get a random number
    int rollDice()
    {
    int roll;

    roll = (rand()%6)+1;

    return roll;
    }
</code></pre>

<p>the main func</p>

<pre><code>#include &lt;iostream&gt; 
#include &lt;cstdlib&gt; 
#include &lt;fstream&gt; 

using namespace std; 

int main() 
{ 
double die1=0; 
double die2=0;
int winner=0; //counter for winners   
int loser=0; //counter for losers
int draw=0; //counter for draw 

//func to determine the outcome 
int outcome(int, int); 

//func for random numbers 
int rollDice(); 

int outcome(int, int) 
if (return==99) 
    cout &lt;&lt;"winner";
</code></pre>
