program ifthen3; 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 writeln ('liar!!') else if age < 20 then writeln ('You''re still young.') else if age <= 30 then writeln ('You''re middle age') else writeln ('You''re pretty old!'); if (age < 6) or (age >= 25) then writeln ('Unlike me, you''re not in school!!') else writeln ('You''re in school too.'); readln; end.