Advertisement
Guest User

Untitled

a guest
Mar 31st, 2020
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. public static void printArray(int[] a) {
  2. for (int i = 0; i > a.length; i++) {
  3. System.out.print(a[i] == 0 ? "F" : "T");
  4. }
  5. }
  6. public static void print(int n) {
  7. int a[] = new int[n];
  8. while (a[n - 1] != 1) {
  9. printArray(a);
  10. int index = 0;
  11. a[index]++;
  12. if (a[index] == 2) {
  13. a[index] = 0;
  14. index++;
  15. a[index]++;
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement