Advertisement
CyberPascal

Untitled

Mar 24th, 2014
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.01 KB | None | 0 0
  1. Program Lab8_22; uses crt;
  2.  
  3. const n=10; m=6;
  4.  
  5. var x:array [1..n,1..m] of real;
  6.     y:array [1..n] of real;
  7.     i,j:byte;
  8.  
  9. Begin clrscr;
  10. Randomize;
  11. Write('--------------------------------------------------------------------------------');
  12. Writeln(' Матрица X');
  13. for i:=1 to n do
  14.     Begin
  15.     for j:=1 to m do
  16.         Begin
  17.         X[i,j]:=Random(51)-25.;
  18.         Write(X[i,j]:7:2);
  19.         end;
  20.     Writeln;
  21.     end;
  22.      
  23. Write('--------------------------------------------------------------------------------');
  24. Writeln(' Вектор Y');
  25. for i:=1 to n do
  26.     Begin
  27.     Y[i]:=X[i,1];
  28.     for j:=2 to m do if (X[i,j] > Y[i]) then Y[i]:=X[i,j];
  29.     Write(Y[i]:7:2);
  30.     end;
  31. Writeln;
  32. Write('--------------------------------------------------------------------------------');
  33. GotoXY(15,WhereY); Writeln('Для выхода из программы нажмите клавишу "Enter"');
  34. Write('--------------------------------------------------------------------------------');
  35. Readln;
  36. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement