Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- int main()
- {
- int n;
- std::cin>>n;
- if(!(n&(n-1)))
- std::cout<<"Power of 2"<<"\n";
- else
- std::cout<<"Not power of 2"<<"\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement