Practice · 1 of 4
Evaluate before storing
CHALLENGE
Difficulty: beginner+25 XP
Implement int addThree(int x): return the value of x after three single +1 assignments — i.e. x + 3. Use exactly three assignment statements and the pattern x = x + 1;.
Press Submit to check your solution.
Back to lesson: Practice: Typed storage