🪔 Navratri Special • 🌙 Eid Blessings
Celebrate the season with Upto 70% OFF + Extra 26% OFF
Use Code: NAVRATRI26
Explore Courses →

Number Pattern Programs in Java  


Program:
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1
  • Program:
    public class NumberPattern4
    {
        public static void main(String[] args)
        {
            for (int i=1; i<=5; i++)
            {
                for (int j=i; j>=1; j--)
                {
                    System.out.print(j+" ");
                }
                System.out.println();
            }
        }
    }