Here is problem i want to make an array with a range of number from 1-9 only. So if the user entered more than or less than the number indicated it will be error and ask the user to reinput the data. So far my code can be used to do so that if the user enter the number one by one... But if the user entered all the number in one shot the reentered value will be prompt to the back automatically for some reason...Let say 10,2,3,4 which was suppose to be 1,2,3,4 became 2,3,4,1 instead... here is the code:
to control input to a two dimension array you need something like nested loops and to prevent double digit input you need something like a while loop. So...
prompt"enter the first digit
enter " digit"
while (digit>0 && digit<10)//allow only 1 - 9
for(int i=0;i<number of rows;i++)//controls row number
for (int j=0;j<number of columns;j++)//controls column number
num[i][j] = digit;//fill a row