Write code that uses a while loop to display the powers of 2 exactly as shown below: 1 2 4 8 16 32 64 128

icon
Related questions
Question

Write code that uses a while loop to display the powers of 2 exactly as shown below:

1
2
4
8
16
32
64
128 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Loop
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.