Advertisement
fooker

bitvalue at yth position

Nov 19th, 2022
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.13 KB | None | 0 0
  1. ll bitvalue(ll x, ll y){
  2.     x=x&((ll)1<<y);
  3.     if (x!=0){
  4.         return 1;
  5.     }
  6.     else {
  7.         return 0;
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement