← Back to Variables
Question 243
Changing a Value
Changing a Value
After you declare a variable you can change its value by assigning a new one, as long as the type stays the same. Declare an int variable named count and assign it 1. On the next line, assign count the new value 10 (without re-declaring the type). Then print count so the final value appears.
Expected Output:
10= newline. The output ends with a newline — print one after the last line.
Hints4 available
Sign in to use hintsTopics:
Variables
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.