109.1..Učitati dvodimenzionalni niz. Ispisati neparne članove matrice.

Opis programa:

Tekstualni algoritam:

Listing programa:

PROGRAM p10911013;
USES
  WinCrt;
VAR
 i, j, n,m : INTEGER;
  X : ARRAY [1..15,1..15] OF INTEGER;
BEGIN
  WRITE('n, m =');
  READLN(n,m);
  FOR i := 1 TO n DO  {ulaz}
    FOR j := 1 TO m DO
      BEGIN
        WRITE('X[',i,',',j,']=');
        READLN(X[i,j]);
      END;
  FOR i := 1 TO n DO  {izlaz}
    BEGIN
      WRITELN;
      FOR j := 1 TO n DO
        IF X[i,j] mod 2 <> 0 THEN
           WRITE(X[i,j],' ');
    END;
END.

Izvođenje programa:

Index