Declared two int arrays sized [20][20] for the matrixes in the .h file, and i'm trying to make a for loop in a external .c library function to get the multiple numbers from a single scanf, i just learnt that you can get multiple inputs doing this scanf("%i %i %i", num1, num2, num3), but i don't think that it will help since the user must be able to input as many numbers as it wants (i figured a max of 20 would cover it). Also the ammount of time i've spent studying has worn me out so i'm not really progressing much and i'm starting to make obvious mistakes. This is my last failed experiment:
Code:
void ingresarMatriz1()
{
int numDato = 0;
int numFila = 0;
for (numFila = 0; numFila < 20; numFila++) {
printf
("Ingrese fila %i para primera matriz, datos separados por espacios\n",
numFila + 1);
for (numDato = 0; numDato < 20; numDato++) {
scanf("%i", &Matriz1[numFila][numDato]);
if (Matriz1[numFila][numDato] == '$') {
break;
}
}
while (getchar() != '\n');
for (int i = 0; i < 20; i++) {
printf("%i ", Matriz1[numFila]);
}
}
}