Skip to content

Instantly share code, notes, and snippets.

@whoo24
Last active December 15, 2015 22:29
Show Gist options
  • Save whoo24/5333860 to your computer and use it in GitHub Desktop.
Save whoo24/5333860 to your computer and use it in GitHub Desktop.
2진수 출력하기 print binary
#include <iostream>
using namespace std;
void print2bin(int d)
{
for(int i = 0; i < 32; ++i)
cout << ((d >> (31 - i )) & 1);
cout << endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment