0
How can i become smaller than j in what case ?
public static void main(String[] args) { int count = 1; for (int i = 0; i < 5; i++) { for (int j = 0; j < 5; j++) { if (i >= j) { System.out.print(count + " "); count = count + 2; } else { System.out.print(" * "); } } System.out.println(""); } } }
1 Respuesta
+ 2
It will print star when i < j.
i.e when i >= j is false