Jump to content


Check out our Community Blogs

ShekharMishra

Member Since 08 Sep 2013
Offline Last Active Sep 08 2013 02:29 AM
-----

#663705 Nested Loops

Posted by ShekharMishra on 08 September 2013 - 02:31 AM

CC Lurker

 this is the solution to your pattern 2...

 

 

class loop

{

public static void main(String args[])

{

for(int i=6;i>=1;i--)

{for(int j=1;j<=i;j++)

{System.out.print(j);

}System.out.println();

}

}

}


  • -1


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download