Created
April 16, 2011 17:58
-
-
Save CrBoy/923345 to your computer and use it in GitHub Desktop.
convert decimal to binary
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <bitset> | |
using namespace std; | |
int main () | |
{ | |
int x; | |
cout<<"Please input one number: "; | |
cin>>x; | |
cout << bitset<32>(x) << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment