//*三角形整理1
public class LoopExample
{
public static void main(String[] args)
{
int jj=4;
for(int i=1;i<=jj;i++)
{
for(int k=1;k<=jj-i;k++)
{
System.out.print(" ");
}
for(int j=1;j<=2*i-1;j++)
{
System.out.print("*");
}
System.out.println( );
}
}
}
//*三角形程序整理二
public class LoopExample2 {
public static void main(String args[]){
String s[][]=new String[2][];
s[0]=new String[2];
s[1]=new String[2];
s[0][1]=new String("*");
s[0][1]=new String("***");
s[1][0]=new String("*****");
s[1][1]=new String("*******");
System.out.println(" * ");
System.out.println(" *** ");
System.out.println(" ***** ");
System.out.println("*******");
}
}