the program below is suppose to ask the user how many random numbers to print , and then print said amount of random numbers, using functions, but it seems to only be printing one random number, any idea why? thanks in advance
okay so i found that the problem was my placement of the return statement, and is now printing the correct amount of numbers, but now my problem is that its only printing numbers from 1-4 and i need it to print numbers from 0 - 9 any input is appreciated thanks
1 2 3 4 5 6 7 8 9 10 11 12
rand(time(0));
for (int i = 0; i < valuesTotal; i++) {
randNumber = rand() % 10;
tallyArray[randNumber]++;
cout << tallyArray[randNumber] << "\n";
}
return;//return should be here instead
}