tarunsinghofficial / HacktoberFest

:octocat: Add your Programs or tech content to help other contributors ✅
379 stars 2.28k forks source link

Check PowerOfTwo.java #2599

Open hacreating opened 1 year ago

hacreating commented 1 year ago

The super optimized program i wrote to check whether a number (we are taken as an input from user ) is power of two or not . if it is then we get output as true otherwise false . eg. if n =8 , 16 ,32 etc , then output is true if n= 10 , 7, 3 etc (Any other number which is not power of two ) ,then output is false.