Các cao nhân sửa hàm cộng giúp em với ạ
const
fi='cong.inp';
fo='cong.out';
var f,g:text;
a,b:string;
function cong(a,b:string):string;
var tong,c:string;
i,nho,tam,m,n,dv:longint;
begin
tong:='';
c:='';
while length(a)<>length(b) do
if length(a)<length(b) then a:='0'+a
else b:='0'+b;
for i:=length(a) downto 1 do
begin
val(a[i],m);
val(b[i],n);
tam:=m+n+nho;
if tam>=10 then nho:=1
else nho:=0;
dv:=tam mod 10;
str(dv,c);
tong:=tong+c;
end;
exit(tong);
end;
//
begin
assign(f,fi); reset(f);
assign(g,fo); rewrite(g);
readln(f,a,b);
writeln(g,cong(a,b));
close(f);
close(g);
end.