lab10B

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
program lab10B;
var mas: array[1..100, 1..100] of integer;
k1, k2, c, i, m, n, k: integer;
begin
randomize;
writeln('vvedit k1, k2, m, n: '); readln(k1, k2, m, n);
for k := 1 to m do begin
for i := 1 to n do begin
mas[k, i] := random(500)-500;
write(mas[k,i]:5)
end;
writeln;
end;
for i := 1 to n do begin
c := mas[k1,i];
mas[k1,i] := mas[k2,i];
mas[k2,i] := c;
end;
writeln('_____________________');
for k := 1 to m do begin
for i := 1 to n do begin
write(mas[k,i]:5)
end;
end;
end.