I have wrote a program that gives the user a choice of whether they want to initialize an array with random generated numbers or keyboard entry.(The user also specifies size). The random generated case worked at one point(I played with the code some more and now it gets stuck in loop). But the Case A for keyboard entry seems to get stuck in an infinite loop. What am I doing wrong here? Thank you in advance for your help.
void fillArray(short original,char choice, short size)
//also have tried cin>>num;original[i]=num;tried a for loop as
case 'b': original[i]=rand();//puts random numbers into array
0 · ·