Advertisement
MrS4g0

3.20

May 22nd, 2022
1,070
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. Program task320;
  3.  
  4.  
  5. Var
  6.     m: array[1..3, 1..3] of Integer = (
  7.         (1, 2, 3),
  8.         (0, 0, 0),
  9.         (-1, 0, 5)
  10.     );
  11.     i, j: Integer;
  12.     flag: Boolean;
  13.  
  14. Begin
  15.     Writeln('Matrix:');
  16.     for i := 1 to length(m) do begin
  17.         for j := 1 to length(m) do begin
  18.             Write(m[i,j], ' ');
  19.         end;
  20.         Writeln('');
  21.     end;
  22.     Writeln('');
  23.  
  24.     Write('Answer: ');
  25.     for i := 1 to length(m) do begin
  26.         flag := True;
  27.         for j := 1 to length(m) do begin
  28.             if m[i,j] <> 0 then begin
  29.                 flag := False;
  30.                 break;
  31.             end;
  32.         end;
  33.         if flag = True then
  34.             Write(i, ' ');
  35.     end;
  36.     Writeln('');
  37.  
  38.     ReadLn;
  39. End.
  40.  
Advertisement
RAW Paste Data Copied
Advertisement