Pattern 06

Given a limit the task is to generate the below given pattern.

1
3 1
5 3 1
7 5 3 1
9 7 5 3 1

Where limit = 5

Java
import java.util.*;
public class PatternV6
{
    public static void main(String args[])
    {
        int n=0,c=1;
        Scanner sc=new Scanner(System.in);
        System.out.print("Enter a limit: ");
        n=sc.nextInt();
        for(int i=1;i<=n;i++)
        {
            for(int j=c;j>=1;j=j-2)
            {
                System.out.print(j+" ");
            }
            c=c+2;
            System.out.println();
        }
    }
}
Java