← Back to Printing
Question 1
Age Variable
Age Variable
Using an integer, create a variable to hold your age (use any age value you'd like, such as 25). Then use printf to display the sentence:
I am [age] years old.
Do not type the age number directly in the printf statement. Instead, use the integer variable you created with %d format specifier.Expected Output:
I am 25 years old.= newline. No newline 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.