(int n)
| 39 | } |
| 40 | |
| 41 | public static void floyds_triangle(int n) { |
| 42 | int number = 1; |
| 43 | for(int i=1; i<=n; i++) { |
| 44 | //numbers |
| 45 | for(int j=1; j<=i; j++) { |
| 46 | System.out.print(number +" "); |
| 47 | number++; |
| 48 | } |
| 49 | //spaces ... |
| 50 | System.out.println(); |
| 51 | } |
| 52 | } |
| 53 | |
| 54 | public static void zero_one_triangle(int n) { |
| 55 | for(int i=1; i<=n; i++) { |