Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program textfile (input, output, f1, f2);
- var
- f1:text;
- f2:text;
- i,j,z :integer;
- x: array [1..10,1..10] of integer;
- begin
- assign(f1, 'd:\fpc\BIN\i386-win32\f1.txt');
- reset(f1);
- assign(f2, 'd:\fpc\BIN\i386-win32\f2.txt');
- for i:=1 to 10 do
- for j:=1 to 10 do
- begin
- while not eof do
- read(f1,x[i,j]);
- end;
- for i:=1 to 10 do
- begin
- for j:=1 to 10 do
- begin
- z:= x[j,10];
- x[j,10]:=x[i,1];
- x[i,1]:=z;
- end;
- end;
- rewrite(f2);
- for i:=1 to 10 do
- begin
- for j:=1 to 10 do
- write(x[i,j]);
- end;
- close(f1);
- close(f2);
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement