Wednesday, January 16, 2008

Pattern Inverted Triangle

+++++

++++

+++

++

+

this is the output of this program

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

No comments: