Advertisement
Guest User

Untitled

a guest
Nov 20th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.71 KB | None | 0 0
  1. Program Ex1;
  2.     const n=10;
  3.     type matrix= array [1..n, 1..n] of real;
  4.     var a,b,c:matrix;
  5.     i,j,k:integer;
  6. Begin
  7.     randomize;
  8.     for i:= 1 to n do //перебор строк
  9.         for j:= 1 to n do //перебор столбцов
  10.             a[i,j]:= random (10);
  11.     Writeln ('matrix A');
  12.     for i:=1 to n do begin
  13.         for j:= 1to n do
  14.             write(a[i,j]:8:2);
  15.         writeln('');
  16.     end;
  17.     for i:= 1 to n do //перебор строк
  18.         for j:= 1 to n do //перебор столбцов
  19.             b[i,j]:= random (10);
  20.     Writeln ('matrix B');
  21.     for i:=1 to n do begin
  22.         for j:= 1to n do
  23.             write(b[i,j]:8:2);
  24.         writeln('');
  25.     end;
  26.     writeln('matrix C');
  27.     for i:=1 to n do begin
  28.         for j:= 1to n do
  29.             write (c[i,j]:8:2);
  30.         writeln;
  31.     end;
  32. end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement