Create a class that asks the user for a number, and then print out the following pattern based on the int input.
So the code I made result looked like this ...
12345
1234
123
12
But it should look like this
5
45
345
2345
12345
Scanner tri = new Scanner(System.in);
System.out.println("Enter a postive integer.");
int shape = tri.nextInt();
for(int c = shape; c > 1; --c){
for (int a = 1; a <= shape-c; a++){
System.out.print(" ");
}
for(int d = 1; d <= c; d++){
System.out.print(d);
}
System.out.println(" ");
for(int d = 1; ...), so why would you even expect it to print lines starting at a higher number?