Computer Science, asked by ApratimDutta, 1 month ago

WAP in
java
to solve the following the pattern
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1

Answers

Answered by kajalpal1975
1

Answer:

public class Pattern {

public static void main(String[] args) {

int i, j;

for (i = 1; i <= 5; i++) {

for (j = i; j >= 1; j--) {

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

}

System.out.println();

}

}

}

Please mark me as the brainliest.

Similar questions