← Back to Loops
Question 282
Powers of Two up to 128
Powers of Two up to 128
Starting from1, repeatedly double the value and print each result up to128, one per line (see Expected Output). Multiply by2each pass and stop once the value passes128.
Expected Output:
1 2 4 8 16 32 64 128
= newline. The output ends with a newline — print one after the last line.
Hints2 available
Sign in to use hintsTopics:
Loops
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.