Saturday, September 18, 2021

Pattern - 2 Number 1 to 5

                         

Pattern - 2



Logic--

                           for(int i=1; i<=5; i++)
                    {
                  for(int j=1; j<=5; j++)
                 {
                             System.out.print(j);
                          }
                              System.out.println( );    
            }


Program-

  
                                                   1 2 3 4 5
                                                   1 2 3 4 5
                                                   1 2 3 4 5
                                                   1 2 3 4 5
                                                   1 2 3 4 5




               class Pattern2
{
            public static void main(String[] args)
{

  for(int i=1; i<=5; i++)
      {
   for(int j=1; j<=5; j++)
   {
                System.out.print(j);
            }
           System.out.println( );    
  }
}
}


For Proper Understanding Watch the Video :-






Thanks;) 
All the Best :)
Keep Learning:) 


         Study:)

  Youtube                      Instagram                             Facebook  
  


 Self:)                                             Instagram                           Facebook


No comments:

Post a Comment

Pattern- 9 Star Pattern

  Pattern- 9 Star Pattern  Logic-                                  for(int i=1; i<=5; i++)                          {              ...