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
Hindi,
2 months ago
Political Science,
2 months ago
Science,
2 months ago
Math,
5 months ago
Computer Science,
5 months ago
Physics,
11 months ago
Social Sciences,
11 months ago