Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- int B;
- cin>>B;
- while (B%2!=1)
- B/=2;
- for(int j=0; B>=1; j++)
- {
- if (B%2!=0)
- cout<<"1";
- else
- cout<<"0";
- B/=2;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement