gọi tệp này là so.inp
uses crt;
const fi='so.inp';
var f1:text;
a,b:array[1..3]of integer;
i,j:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
for i:=1 to 3 do
read(f1,a[i]);
readln(f1);
for j:=1 to 3 do
read(f1,b[j]);
{------------------------xuat------------------}
for i:=1 to 3 do
write(a[i]:4);
writeln;
for j:=1 to 3 do
write(b[j]:4);
close(f1);
readln;
end.
uses crt;
const fi='so.inp';
var f1:text;
a,b:array[1..100]of integer;
dem,dem1,i,j:integer;
begin
clrscr;
assign(f1,fi); reset(f1);
dem:=0;
while not eoln(f1) do
begin
dem:=dem+1;
read(f1,a[dem]);
end;
readln(f1);
dem1:=0;
while not eoln(f1) do
begin
inc(dem1);
read(f1,b[dem1]);
end;
for i:=1 to dem do
write(a[i]:4);
writeln;
for j:=1 to dem1 do
write(b[j]:4);
close(f1);
readln;
end.