✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
Quin serà el contingut final de la matriu al final de l'execució d'aquest algorisme:
Suposem que l'usuari entra els següent valors pel teclat: 2, 4, 6, 8, 10 i 12.
algorisme matrius constant DIM <- 4; fconstantvar m: taula[DIM][DIM] de enter f, c: enterfvarinici f <- 0 mentre (f < DIM) fer m[f][f] <- 0 f <- f+1 fmentre per f <- 0 fins DIM-1) fer per c <- f+1 fins DIM-1 fer llegir(m[f][c]) m[c][f] <- m[f][f] fper fper falgorisme