Skip to content

Instantly share code, notes, and snippets.

@CrBoy
Created April 16, 2011 17:58
Show Gist options
  • Save CrBoy/923345 to your computer and use it in GitHub Desktop.
Save CrBoy/923345 to your computer and use it in GitHub Desktop.
convert decimal to binary
#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