Advertisement
Guest User

Problema 1

a guest
Nov 22nd, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. void binar( int n )
  4. {
  5. if( n != 0 )
  6. {
  7. binar( n / 2 );
  8. cout << n % 2;
  9. }
  10. }
  11. int main()
  12. {
  13. long long int n;
  14. cin >> n;
  15. binar( n );
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement