#include using namespace std; int n; int *x; void Show(int *x) { for (int i = 1; i <= n; i++) { cout << x[i]; } cout << endl; } int Try(int k) { for (int i = 0; i <= 1; i++) { x[k] = i; if (k == n) { Show(x); } else { Try(k + 1); } } } int main() { cout << "Nhap n: "; cin >> n; x = new int(n + 1); Try(1); return 0; }