I'm trying to display the random numbers that were generated into the array, but the output only displays one number multiple times. I was debugging the code and saw that the array was creating random numbers into it though. I've tried looking online for an answer but nothing seems to allow me to display the random numbers. I'm a super noob and am getting confused. Any information would be greatly appreciated.
main()
{
int unSortedNumbers[10] = { 0 }, i = 0;
for (i = 0; i < US; i++){
srand((unsigned)time(NULL));
unSortedNumbers[i] = LB + rand() % (UB - LB + 1);
}
for (i = 0; i < US; i++)
printf("number %i) is %i.\n", i, unSortedNumbers[i]);
pause;
}