Write a program that prints the power of integer 2,namely 2, 4, 8, 16, 32, 64, e
ID: 3616720 • Letter: W
Question
Write a program that prints the power of integer 2,namely 2, 4, 8, 16, 32, 64, etc. Your while loop should not terminate (i.e., you should creatan infinite loop). To do this, simply use the key word true as the expression for the whilestatement. What happens when you run this program? Write a program that prints the power of integer 2,namely 2, 4, 8, 16, 32, 64, etc. Your while loop should not terminate (i.e., you should creatan infinite loop). To do this, simply use the key word true as the expression for the whilestatement. What happens when you run this program?Explanation / Answer
please rate - thanks without the system("pause"); things go off the screen toofast to see what is happening. you can get rid of it after you get your answer #include using namespace std; int main() {int a=1; while(true) {a*=2; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.