logo

Crowdly

Quin serà el contingut final de la matriu al final de l'execució d'aquest algori...

✅ 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 ?? és

constant DIM <- 4; fconstant

var

   m: taula[DIM][DIM] de enter;

   f, c: enter;

fvar

inici

   f <- 0;

   mentre (f<DIM) fer

      m[f][f] <- 0;

      f <- f+1;

   fmentre

   per f <- DIM-1 fins 0 pas-1 fer

      per c <- f-1 fins 0 pas -1 fer

         llegir(m[f][c]);

         m[c][f] <- m[f][c];

      fper

   fper

falgorisme

 

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on campusvirtual.urv.cat?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!