i want to get the no of rows for my matrix but 1st want to check whether the user has input an integer or not.if the user has input a non int then i ask the user again and again to enter the no of rows till he input integer.the code so for is;
char row[5];
printf("Enter the Number of rows : ");
scanf("%s",&row);
int counter=0;
int counter1=0;
while( counter < 5 )
{
if ( !isdigit( row[counter] ) )
{
printf("Please enter again :");
scanf("%s",&row);
counter1=1;
}
if(counter1==0)
counter++;
else
{
counter1=0;
counter=0;
}
}