Computer Science, asked by anushkashree2204, 9 months ago

ns to generate the following patterns using iteration (loop)
(b) 5 4 3 2 1
5 4 3 2
5 4 3
5 4
5
(ICSE 2015)​

Answers

Answered by Oreki
1

public class Triangle {

public static void main(String[ ] args) {

for (int i = 0; i < 5; i++) {

for (int j = 5; j > i; j- -)

System.out.print(j + " ");

System.out.println( );

}

}

}

Similar questions