โ Back to User Input
Question 23
Age Calculator Input
Age Calculator Input
Write a program that reads a person's name (single word) and age, then calculates and displays their age in 10 years: Hello [name], in 10 years you will be [age] years old! Read the name as a string and age as an integer using cin.
Expected Output:
Hello John, in 10 years you will be 35 years old!
Topics:
User Input
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.