Câu 1:
uses crt;
const fi='dl.doc';
fo='tb.doc';
var f1,f2:text;
a,b:integer;
tbc:real;
begin
clrscr;
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,a);
readln(f1,b);
{-----------------------------------cau-a-----------------------------}
writeln('a=',a);
writeln('b=',b);
{-----------------------------------cau-b-----------------------------}
tbc:=(a+b)/2;
writeln(f2,tbc:4:2);
close(f1);
close(f2);
readln;
end.