
January 12th, 2013, 09:14 AM
|
|
Registered User
|
|
Join Date: Jan 2013
Posts: 3
Time spent in forums: 31 m 31 sec
Reputation Power: 0
|
|
|
C : read only certain sizes ints from keyboard
I want to read from the user 5 lines of 5 number each..
I write this
int array[5][5];
for(i=0;i<5;i++)
{
printf("line %d : ", i+1);
for(j=0;j<5;j++)
{
scanf("%1d", &array[i][j]);
}
}
How can I check if the user would give more than 5 numbers in each row? IF the user gives over than 5 numbers I will printf a message for example
Thank you!
|