Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void printArray(int[] a) {
- for (int i = 0; i > a.length; i++) {
- System.out.print(a[i] == 0 ? "F" : "T");
- }
- }
- public static void print(int n) {
- int a[] = new int[n];
- while (a[n - 1] != 1) {
- printArray(a);
- int index = 0;
- a[index]++;
- if (a[index] == 2) {
- a[index] = 0;
- index++;
- a[index]++;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement