Created
May 30, 2018 18:32
-
-
Save colesnicov/7f845d9326d042a79b44638341c72fc3 to your computer and use it in GitHub Desktop.
Decimal to Binary converting
This file contains 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> | |
using namespace std; | |
int main() | |
{ | |
int a,b; | |
cin>>a; | |
for(int i=7;i>=0;i--) | |
{ | |
b=(a>>i)&1; | |
cout<<b; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment