CJCoding With Joseph
15free / daySign inCreate account

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!

= newline. No newline after the last line.

Hints4 available
Topics:
User Input
📥 Auto-Input:
John\n25\n
This input is automatically fed to your program's stdin
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · 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.