var s1,s2:string;
function cong(s1,s2:string):string;
var i,nho,so1,so2,kq:byte;
s:string;
begin
cong:='';
if length(s1)<length(s2) then
begin
for i:=1 to length(s2)-length(s1) do
s1:='0'+s1;
end
else if length(s2)<length(s1) then
begin
for i:=1 to length(s1)-length(s2) do
s2:='0'+s2;
end;
nho:=0;
for i:=length(s1) downto 1 do
begin
val(s1[i],so1);
val(s2[i],so2);
kq:=so1+so2+nho;
if kq>=10 then
begin
nho:=1;
kq:=kq mod 10;
end
else nho:=0;
str(kq,s);
cong:=s+cong;
end;
if nho=1 then cong:='1'+cong;
end;
BEGIN
clrscr;
write('Nhap so thu nhat: '); readln(s1);
write('Nhap so thu hai: '); readln(s2);
write(s1,'+',s2,'= ',cong(s1,s2);
readln;
end.