Question: Write an interactive script that asks for the user's age. If it is equal to or higher than 21, print a message saying that this

Write an interactive script that asks for the user's age. If it is equal to or higher than 21, print a message saying that this user is allowed to drink alcohol. If the user's age is below 21, print a message telling the user how many years he or she has to wait before legally being allowed to drink. Display your script on the terminal using the cat command. Run the script and give inputs 15, then 30.

Step by Step Solution

3.53 Rating (156 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create an interactive script that accomplishes what youve described you can use a simple shell sc... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!