Advertisement
AlexeySychev

Untitled

Apr 14th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. Program zadacha4;
  2.  
  3. Var a:array[1..5,1..8] of integer;
  4.  
  5. I,j: integer;
  6.  
  7. Begin
  8.  
  9. Randomize;
  10.  
  11. For i:=1 to 5 do
  12.  
  13. Begin
  14.  
  15. For j:=1 to 8 do
  16.  
  17. begin
  18.  
  19. A[I,j]:=-15+random(15-(-15+1));
  20. Write(a[I,j]:3);
  21. End;
  22.  
  23. Writeln;
  24.  
  25. End;
  26. For i:=1 to 5 do
  27. begin
  28. for j:=1 to 8 do
  29. if ((i mod 2) = 0) and ((j mod 2)= 0) and (a[i,j] > 0) and ((a[i,j] mod 3) = 2) then
  30. begin
  31. writeln(a[i,j]);
  32. end;
  33. end;
  34. End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement