← Back to Printing
Question 177
Introduce Yourself
Introduce Yourself
Two variables have already been created for you: a name (a string) and an age (an integer). Use a single printf call with format specifiers to build a sentence that includes both values. Use%swhere the name should appear and%dwhere the age should appear. This shows how printf can weave variables into a line of text instead of just printing fixed words.
Expected Output:
My name is Maya and I am 25 years old.= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Printing
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.