Home »
» Pattern printing in java simple
Pattern printing in java simple
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
public class Print{
public static void main(String[] args){
int i=1;
int j;
while(i<=7){
for(j=1;j<=i;j++)
System.out.print("*");
i=i+2;
System.out.println();
}
i=5;
while(i>=1){
for(j=1;j<=i;j++)
System.out.print("*");
i=i-2;
System.out.println();
}
}
}
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">