1 2 3 4 5 6 2 3 4 5 6 3 4 5 6 4 5 6 5 6 6
Answer :
public class Pattern123
{
public static void main(String[] args)
{
for(int i=1;i<7;i++)
{
for(int j=i;j<7;j++)
{
System.out.print(j+" ");
}//end of inner for loop
System.out.println();
}//end of outer for loop
}
}
No comments:
Post a Comment