How can i become smaller than j in what case ? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
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(""); } } }

29th Oct 2022, 11:35 AM
Rakan Ezzedin
1 Resposta
+ 2
It will print star when i < j. i.e when i >= j is false
29th Oct 2022, 11:40 AM
Jayakrishna šŸ‡®šŸ‡³