WRITE A JAVA PROGRAM TO DISPLAY THE FOLLOWING PATTERN:-
12345
2345
345
45
5
Answers
Answered by
0
Answer:
import java.util.Scanner;
public class Pattern {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Enter n: ");
int n = scanner.nextInt();
for (int i = 1; i <= n; i++) {
for (int j = i; j <= n; j++) {
System.out.println(j);
}
}
}
Output:
12345
2345
345
45
5
Answered by
7
Answer:
And pls follow me..
Explanation:
Merry Christmas
mark me as brainlist ..
Similar questions