Guest User

Untitled

a guest
Mar 18th, 2018
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4. void step(int n){
  5. if (n>0){
  6. step(n/2);
  7. cout<<(n%2);
  8. }
  9. }
  10. int main() {
  11. int n;
  12. setlocale(LC_ALL, "Russian");
  13. cout<<"Введите число";
  14. cin>>n;
  15. cout<<"двоичная запись числа=";
  16. step(n);
  17. return 0;
  18. }
Add Comment
Please, Sign In to add comment