any one have any suggestions why my code won't work?
#include <iostream>
#include <fstream>
#include <cmath>
using namespace std;
int intro(int &num_games);
int random();
int main(void)
{
int seed(0), num_games(0);
int point, point2(1);
int a(0), b(0), c(0), d(0);
cout<<"Lexi Barlow and Alex Puffer craps.cpp"<<endl;
intro(num_games);
cout<<"\nEnter a random seed number: "<<endl;
cin>>seed;
srand(seed);
while(num_games>0)
{
cout<<"\nYou have "<<num_games<<" games left."<<endl;
num_games--;
cout<<"Roll the die"<<endl;
system("pause");
a=random();
b=random();
point=a+b;
cout<<"\nYou rolled "<<a<<"+"<<b<<"="<<point<<"."<<endl;
if(point==7)
{cout<<"You win!";}
else if(point==11)
{cout<<"You win!";}
else if(point==2)
{cout<<"You lose.";}
else if(point==3)
{cout<<"You lose.";}
else if(point==12)
{cout<<"You lose.";}
else
{
while((point2!=7)||(point2!=point))
{
cout<<"You roll again\n";
c=random();
d=random();
point2=c+d;
cout<<"\nYou rolled "<<c<<"+"<<d<<"="<<point2<<"."<<endl;
if (point2==7)
{cout<<"You lost";}
else if (point2==point)
{cout<<"You won";}
}
}
}
system("pause");
return(0);
}
int intro(int &num_games)
{
cout<<"\nOur program simulates a game of craps. "<<endl;
cout<<"Random numbers will be generated to simulate rolling dice. "<<endl;
cout<<"You will need to input a random seed number and the number "<<endl;
cout<<"of games you would like to play. Enjoy!"<<endl;
cout<<"How many games would you like to play? "<<endl;
cin>>num_games;
return(num_games);
}
int random()
{
return 1+ rand()%6;
}