Task 6 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

3.4 Methods — double then add one

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Two helpers are written above. Fill in doubleThenAddOne so that it doubles n and then adds one — by calling both helpers.

For doubleThenAddOne(5) the program prints 11.

Your solution