Exercise: Age limit
-
Create a script called
age_limit_stdin.cr -
Ask the user what is their age.
-
If it is above 18, tell them they can legally drink alcohol.
-
If is is above 21, tell them they can also legally drink in the USA.
-
Extra: ask the user for their age and the name of their country and tell them if they can legally drink alcohol.
-
See the Legal drinking age list.
-
Don't worry if this seems to be too difficult to solve in a nice way. We'll learn more tools to improve.