program ifthen2; uses crt; {-------------------------------------------------------------------------- This program will ask for the user's age and then print out a predetermined response depending. It will also demonstrate the use of ELSE, AND, and OR. by --------------------------------------------------------------------------} VAR age,n:integer; begin clrscr; write ('Hello. How old are you? ---> '); readln (age); writeln; if (age < 0) or (age > 120) then begin writeln ('liar!!'); n := 1; end; if n <> 1 then begin if age < 20 then writeln ('You''re still young.') else if (age >= 20) and (age >= 30) then writeln ('You''re middle age') else writeln ('You''re pretty old!'); end; readln; end.