Help

how can I display my 20 random numbers array into a 80 element array that has been initialized to zero.

#include <iostream>
#include <cstdlib>
using namespace std;
void kenoBoard(int[], int);
void randomTwenty();


void kenoBoard(int tabl[], int size)
{
for (int i=1; i<=size; i++){
tabl[i]=0;
//cout<<tabl[i]<<'\t';
}
cout <<endl;
cout << "-BOARD IS INTI TO ZERO---------- \n";
}

void randomTwenty(int tabl[], int size)
{

int newseed;
int ranNum[20];
int i=0;

cout<<"Enter an integer to seed the random number generator"<<endl;
cin >> newseed;
srand(newseed);

while (i <= 20 )
{
ranNum[i]=rand()% 80 + 1;
//cout<<ranNum[i]<<endl;
i++;}


}
int main()
{
int size=80;
int tabl[size];
kenoBoard(tabl, size);
randomTwenty(tabl, size);
}
Topic archived. No new replies allowed.