Write a program that will accept a single integer from the user as input. It will then draw a triangular shape using numbers to fill out that shape as shown in the examples.
Ex: If input is:
4
Output is:
4
34
234
1234
321
21
1
If the input is 8, the output is:
8
78
678
5678
45678
345678
2345678
12345678
7654321
654321
54321
4321
321
21
1
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
/* Type code here */
}
}