Thursday, March 26, 2009

java code to prtint a pattern

public class patternz
{
public static void main(String[] u)
{
for(int i=1;i<=20;i++)
{
for(int sp=20;sp>i;sp--)
{
System.out.print(" ");
}
for(int j=1;j{
System.out.print("* ");
}
System.out.println();
}
}

}

0 comments: