Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- void TenTwo(int n){
- if (n >= 2)
- TenTwo(n/2);
- cout << n%2;
- }
- int main()
- {
- setlocale(LC_ALL,"rus");
- int n;
- cout << "введите n" << endl;
- cin >> n;
- cout << "Число " << n << " в двоичной сс: ";
- TenTwo(n);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement