Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * nhiphan.cpp
- *
- * Copyright 2014 by nguyenvanquan7826
- *
- * Email : [email protected]
- * Blog : nguyenvanquan7826.wordpress.com
- *
- */
- #include <iostream>
- #define N 3
- using namespace std;
- int a[N];
- void quaylui(int i){
- for (int j = 0; j < 2; j++){
- a[i] = j;
- if (i < N){
- if (i == N - 1){
- for (int k = 0; k < N; k++)
- cout << a[k];
- cout << endl;
- }
- else quaylui(i+1);
- }
- }
- }
- int main (int argc, char **argv)
- {
- quaylui(0);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement