или вот такой вариант еще есть const nMax = 10; var a:array [1..nMax] of integer; i :integer; begin readln(k, l); for i := 1 to m do begin a[i, k] := a[i, k] + a[i, l]; a[i, l] := a[i, k] - a[i, l]; a[i, k] := a[i, k] - a[i, l]; end; end. /////////////////////////////////////////////////////// a|b 3|5 a = a+b; = 8; b = a - b; = 3 a = a - b; = 5
вот оба вариант, исправил задание массива и цикл http://ideone.com/agJmpO
И раз constnMax = 10; var a:array [1..nMax,1..nMax] of integer; buf :integer; begin readln(k, l); for i := 1 to nMax do begin buf := a[i, k]; a[i, k] := a[i, l]; a[i, l] := buf; end; end.
И два const nMax = 10; var a:array [1..nMax,1..nMax] of integer; i :integer; begin readln(k, l); for i := 1 to nMax do begin a[i, k] := a[i, k] + a[i, l]; a[i, l] := a[i, k] - a[i, l]; a[i, k] := a[i, k] - a[i, l]; end; end.
спасибо)
Пожалуйста :)