Pyramid Of Numbers 4 - Java

1 comments - Post a comment

class pyramid1
{
public static void main(String args[])
{
int i,j;
for(i=1;i<=3;i++)
{
for(j=1;j<=i;j++)
System.out.print(j+"\t");
System.out.println();
}
}
}

/* OUTPUT

1
1 2
1 2 3

 
This Post has 1 Comment Add your own!
Anonymous - August 26, 2010 at 2:28 AM

Thanks. I couldn't figure this out.
-Matt

Post a Comment