Question: Develop a design that leads to an algorithm and a program that will read in a positive integer that represents a potential power of 2.
Develop a design that leads to an algorithm and a program that will read in a positive integer that represents a potential power of 2. The output will be "yes" for a power of 2 and "no" when it is not a power of 2. Some examples of power of 2: 1, 8, 4096. Some examples of not power of 2: 9, 100, 5000. You must start with pseudocode and provide pseudocode for this exercise. (you may need selection, repetition, and possibly function for this exercise.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
