Gromov

Untitled

Nov 20th, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. program project1;
  2. uses
  3. CRT;
  4. Var
  5. r,k,max,rmax,kmax:Integer;
  6. x:array[1..3,1..3]of Integer =
  7. ((5,-3,6),
  8. (2,-1,-9),
  9. (8,-5,7));
  10.  
  11. begin
  12. TextColor(LightRed);
  13. Writeln('Dotais masivs');
  14. TextColor(White);
  15. For k:=1 to 3 do
  16. For r:=1 to 3 do
  17. write(x[r,k]:3);
  18. writeln;
  19. max:=x[1,1];
  20. rmax:=1;
  21. kmax:=1;
  22. For r:=1 to 3 do
  23. For k:=1 to 3 do
  24. If x[r,k]>max then
  25. begin
  26. max:=x[r,k];
  27. rmax:=r;
  28. kmax:=k;
  29. end ;
  30. TextColor(yellow);
  31. Writeln('Max=',max);
  32. TextColor(green);
  33. Writeln('Rinda=',rmax);
  34. TextColor(LightBlue);
  35. Writeln('Kolona=',kmax);
  36. Readln;
  37. end.
Add Comment
Please, Sign In to add comment