Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <bitset>
- #include <string>
- using namespace std;
- void DecToBin(int a)
- {
- if (a / 2 != 0) {
- DecToBin(a / 2);
- }
- printf("%d", a % 2);
- }
- int main()
- {
- int a;
- cin>>a;
- DecToBin(a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement