Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Bitwise - Check power of 2 or not
//g++ 5.4.0 #include <iostream> int main() { int num; std::cin >> num; if(num && !(num & (num - 1))) std::cout << "Power of 2"; else std::cout << "Not power of 2"; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
ledproject
Dar
sort
bin search
multi bitmap
5345
Dictionary
said
5
Cyclically rotate an array by one
stackse - search stackoverflow differently
Please log in to post a comment.