Well. I'm trying to create a program in which a user can pick how many will be playing, ask for each players name ask each user how many tickets to pick, then how many numbers the user wants to display.
the code works just fine.
I'm just having trouble dividing it into 2 functions. userInput(), userOutout();
const int size = 20;
int numPlayers[size];
int quickNum[size];
int length[size];
int main ()
{
cout<<"How many players will be playing?"<<endl;
cin>>numPlayers[size];
for(int a=0; a<numPlayers[size]; a++){
cout<<"What is your name player # "<<a+1<<"?"<<endl;
string name;
cin>>name;
cout<<"Hello "<<name<<" how many quick picks will u be playing today?"<<endl;
cin>>quickNum[size];
for(int b=0; b<quickNum[size]; b++){
cout<<"What should the length of quick pick # "<<b+1<<" be"<<endl;
cin>>length[size];
cout<<"Your numbers are: ";
srand((unsigned)time(0));
int random_integer;
for(int index=0; index<length[size]; index++){
random_integer = (rand()%99)+1;
cout << random_integer<<" ";
}
cout<<endl;
}
}
}