write algorithm for the number of power 2 or not
Answers
Answered by
2
Answer:
Another solution is to keep dividing the number by two, i.e, do n = n/2 iteratively. In any iteration, if n%2 becomes non-zero and n is not 1 then n is not a power of 2. If n becomes 1 then it is a power of 2.
Answered by
0
Answer:
It will be not ............
Similar questions
Social Sciences,
1 month ago
Math,
3 months ago
Computer Science,
3 months ago
Physics,
9 months ago