第3个回答 2010-10-31
var
a,b,c:integer;
procedure age(a,b:integer;var d:integer);
var
c:integer;
begin
if a>=b then
begin
c:=a-b;
d:=b-c;
end;
if a<b then
begin
c:=b-a;
d:=a-c;
end;
end;
begin
write('Input the father's age : ');
readln(a);
write('Input xiaohong's age : ');
readln(b);
age(a,b,c);
write('The answer is : ',c);
readln;
end.