Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that takes in a person's name and age if they are under the * age of 18 print out Sorry , too

Write a program that takes in a person's name and age if they are under the * age of 18 print out "Sorry , too young" if they are between the ages of * 18 (inclusive) and 21 (excluded)--> [18,21) print out * "Hey you're an adult! But can't drink yet..." if they are 21 or older * print out "Look forward to paying bills until you die " * * SAMPLE RUN * ----------------------- * Please enter your age: 19 * Please enter your name: Kate * * Hey Kate you're an adult! But can't drink yet... * ------------------------ * Please enter your age: 10 * Please enter your name: Amy * * Sorry Amy, too young * ------------------------ * Please enter your age: 33 * Please enter your name: Josh * * Look forward to paying bills until you die Josh */

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

Does your message present a conclusion?

Answered: 1 week ago

Question

differentiate the function ( x + 1 ) / ( x ^ 3 + x - 6 )

Answered: 1 week ago