Chapter 4: Problem 29
\((\text { Multiples of } 2\) with an Infinite Loop) Write a program that prints the powers of the integer \(2,\) namely \(2,4,8,16,32,64,\) etc. Your while loop should not terminate (i.e., you should create an infinite loop). To do this, simply use the keyword true as the expression for the while statement. What happens when you run this program?
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.