Wednesday, January 16, 2008

Pattern RightTriangle

1

12

123

1234

this will be printed By this program

class RightTriangle
{
public static void main()
{
for(int i=0;i<5;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print(j);
}
System.out.println();
}
}
}

No comments: