[ create a new paste ] login | about

Link: http://codepad.org/MWS0ln0g    [ raw code | output | fork ]

C++, pasted on Jul 19:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <iostream>
 
using namespace std;
 
int main() {
int x = 5;
        int count=0;
      while(x)
      {
          count++;
          x = x&(x-1);
      }
      return count;
        return 0;
}


Output:
1
Exited: ExitFailure 2


Create a new paste based on this one


Comments: