uses crt; Const MAX = 6; str_1 = 3; str_2 = 5; Var i, j: byte; a: Array[1..MAX, 1..MAX] of byte; t: Byte; Procedure Print; Begin For i := 1 to MAX do Begin For j := 1 to MAX do Write(a[i,j], ' '); Writeln; End; Writeln; End; Begin ClrScr; Randomize; For i := 1 to MAX do For j := 1 to MAX do a[i,j] := Random(10)+1; Print; ReadKey; For i := 1 to MAX do Begin t := a[str_1,i]; a[str_1, i] := a[str_2,i]; a[str_2, i] := t; End; Print; Readkey; End.
Источник:
Категория: Матрицы | Добавил: Seqular (23.11.2008)
| Автор: Дмитрий