Câu 1:
uses crt;
var a,b,c,d,t:integer;
{------------------------chuong-trinh-con-tinh-tong-cua-hai-so-----------------}
function tong(var x,y:integer):integer;
begin
tong:=x+y;
end;
{------------------------chuong-trinh-chinh----------------------}
begin
clrscr;
write('Nhap so thu nhat: '); readln(a);
write('Nhap so thu hai: '); readln(b);
write('Nhap so thu ba: '); readln(c);
write('Nhap so thu tu: '); readln(d);
t:=tong(a,b)+tong(c,d);
writeln('Tong cua bon so la: ',t);
readln;
end.
Câu 2:
const fi='dulieu.dat';
assign(f1,fi); reset(f1);