Q.Write a java program to display following pattern: [15 M]
5
4 5
3 4 5
2 3 4 5
1 2 3 4 5
public class NumberPattern {
public static void main(String[] args) {
for(int i = 5; i >= 1; i--) {
for(int j = i; j <= 5; j++) {
System.out.print(j + " ");
}
System.out.println();
}
}
}
