DEV Community

hema latha
hema latha

Posted on

pattern program basic

public static void main(String[] args) {
        // TODO Auto-generated method stub

        for(int row = 5; row>=3; row-- ) 
        {

        for(int no = 1; no<=5; no++)
       {
           System.out.print(row);

       }
        System.out.println();

    }

out put 
55555
44444
33333
Enter fullscreen mode Exit fullscreen mode

Top comments (0)