program kabe1; var laud: array[1..8, 1..8] of char; procedure loeLaud(failinimi: string); var rida, veerg: integer; f: text; s: string; begin assign(f, failinimi); reset(f); for rida:=1 to 8 do begin readln(f, s); for veerg:=1 to 8 do laud[rida, veerg]:=s[veerg]; end; close(f); end; procedure trykiLaudEkraanile; var rida, veerg: integer; begin for rida:=1 to 8 do begin for veerg:=1 to 8 do write(laud[rida, veerg]); writeln; end; end; procedure trykiLaudFaili(failinimi: string); var rida, veerg: integer; f: text; begin assign(f, failinimi); rewrite(f); for rida:=1 to 8 do begin for veerg:=1 to 8 do write(f, laud[rida, veerg]); writeln(f); end; close(f); end; begin loeLaud('algseis.txt'); trykiLaudEkraanile; trykiLaudFaili('seis2.txt'); end.