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
Labels: Core Java
Subscribe to:
Post Comments (Atom)
Thanks. I couldn't figure this out.
-Matt