Write a program to Print Inverted Right Angled Triangle reversed whole numbers
Take an integer input n and Print the pattern.
Input Format
A single line n take input from user.
Constraints
1<=n<=100
Output Format
Print the pattern
Sample Input 0
9
Sample Output 0
9 8 7 6 5 4 3 2 1
9 8 7 6 5 4 3 2
9 8 7 6 5 4 3
9 8 7 6 5 4
9 8 7 6 5
9 8 7 6
9 8 7
9 8
9
Sample Input 1
7
Sample Output 1
7 6 5 4 3 2 1
7 6 5 4 3 2
7 6 5 4 3
7 6 5 4
7 6 5
7 6
7
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
for(int i=1; i<=n; i++){
for(int j=n; j>=i; j--){
System.out.print(j+" ");
}
System.out.println();
}
}
}