Write a program that takes the birth year from the user and prints her/his age. Here are sample runs of the program: Sample 1: Enter your birth year: 1981 Your Age is: 42 years Sample 2: Enter your birth year: 2000 Your Age is: 23 years
Write a program that takes the birth year from the user and prints her/his age. Here are sample runs of the program: Sample 1: Enter your birth year: 1981 Your Age is: 42 years Sample 2: Enter your birth year: 2000 Your Age is: 23 years
Chapter8: Advanced Method Concepts
Section: Chapter Questions
Problem 8RQ
Related questions
Question
![Write a program that takes the birth year from the user and prints her/his age.
Here are sample runs of the program:
Sample 1:
Enter your
birth
Your Age is: 42 years
Sample 2:
year: 1981
Enter your birth year: 2000
Your Age is: 23 years
3](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F04be1d89-f07c-42cf-a57b-7cb3cbfba4ab%2F11512109-c197-438f-8d0e-e49227b6f6e5%2Fsgwx3w_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Write a program that takes the birth year from the user and prints her/his age.
Here are sample runs of the program:
Sample 1:
Enter your
birth
Your Age is: 42 years
Sample 2:
year: 1981
Enter your birth year: 2000
Your Age is: 23 years
3
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
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 4 steps with 3 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
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#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
![Microsoft Visual C#](https://www.bartleby.com/isbn_cover_images/9781337102100/9781337102100_smallCoverImage.gif)
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
![C++ Programming: From Problem Analysis to Program…](https://www.bartleby.com/isbn_cover_images/9781337102087/9781337102087_smallCoverImage.gif)
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning