CJCoding With Joseph
15free / daySign inCreate account

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 scanf.

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 (p, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.