program casestmt; uses crt; {-------------------------------------------------------------------------- This program will ask for the user's age and then print out a predetermined response depending. This program will do this by use of a case statement. --------------------------------------------------------------------------} VAR age:real; age2:integer; begin clrscr; write ('Hello. How old are you? ---> '); readln (age); writeln; age2 := round(age); if (age2 > 125) or (age < 0) then writeln ('liar!') else case age2 of 16 : writeln ('You can drive now!') ; 18 : writeln ('You can vote and smoke!') ; 21 : writeln ('You can drink alcohol!') ; 40 : writeln ('You''re over the hill!') ; 65 : writeln ('You can get senior perks!'); 100 : writeln ('You are a century old!'); else writeln ('No big deal'); end; readln; end.