Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int arr[64];
- int i = 0;
- int l = 0;
- int n = 33;
- for (int i = 0; i < 64; i++)
- {
- arr[i] = 2;
- }
- while(n)
- {
- arr[i++] = n % 2;
- n /= 2;
- }
- for (int i = 0; i < 64; i++)
- {
- if (arr[i] != 2)
- {
- l++;
- }
- }
- cout << l;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement