Write a program that asks the user to enter a person’s age. The program should display a message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: • If the person is 1 year old or less, he or she is an infant. • If the person is older than 1 year, but younger than 13 years, he or she is a child. • If the person is at least 13 years old, but less than 20 years old, he or she is a teenager. • If the person is at least 20 years old, he or she is an adult.
Write a program that asks the user to enter a person’s age. The program should display a message indicating whether the person is an infant, a child, a teenager, or an adult. Following are the guidelines: • If the person is 1 year old or less, he or she is an infant. • If the person is older than 1 year, but younger than 13 years, he or she is a child. • If the person is at least 13 years old, but less than 20 years old, he or she is a teenager. • If the person is at least 20 years old, he or she is an adult.
Chapter4: Making Decisions
Section: Chapter Questions
Problem 3E: Write a program named Admission for a colleges admissions office. The user enters a numeric high...
Related questions
Question
Write a
Following are the guidelines:
• If the person is 1 year old or less, he or she is an infant.
• If the person is older than 1 year, but younger than 13 years, he or she is a child.
• If the person is at least 13 years old, but less than 20 years old, he or she is a teenager.
• If the person is at least 20 years old, he or she is an adult.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning