below is a exerpt of what I have for them to enter the input for the matrix. I am attempting to be able to stop the error, when the person enters a number it works, but when they enter a chara it spams out text till the end not allowing anymore user input. Is there any script of code I could use to check each one before it caused a problem or maybe not use floating as my input. Not sure if this is to broad but thanks for the help if you can.
printf("Please start entering the terms of the first matrix below.\n");
printf("Matrix 1 row 1 colum 1: ");
scanf( "%f", &array_a[0][0]);
printf("Matrix 1 row 1 colum 2: ");
scanf( "%f", &array_a[0][1]);
printf("Matrix 1 row 1 colum 3: ");
scanf( "%f", &array_a[0][2]);
printf("Matrix 1 row 2 colum 1: ");
scanf( "%f", &array_a[1][0]);
printf("Matrix 1 row 2 colum 2: ");
scanf( "%f", &array_a[1][1]);
printf("Matrix 1 row 2 colum 3: ");
scanf( "%f", &array_a[1][2]);
printf("Matrix 1 row 3 colum 1: ");
scanf( "%f", &array_a[2][0]);
printf("Matrix 1 row 3 colum 2: ");
scanf( "%f", &array_a[2][1]);
printf("Matrix 1 row 3 colum 3: ");
scanf( "%f", &array_a[2][2]);