Написано на Pascal.
Var a, b: Integer;
If (a > 10000) Or (b > 10000) Then
WriteLn('Error! Age is bigger then 10000')
If(aWriteLn('Mother is older than father')
Else if(a>b) Then
WriteLn('Mother is younger than father')
Writeln('Mother and father are the same age');