class Foruse
{
public static void main(String[] args)
{
for (int x=0;x<4 ;x++ )
{
for (int y=0;y<x+1 ; y++)
{
System.out.print("*");
}
System.out.println();
}
for (int x=4;x>0 ;x--)
{
for (int y=0;y<x ; y++)
{
System.out.print("*");
}
System.out.println();
}
for (int x=0;x<9 ;x++)
{
for (int y=0;y<=x ; y++)
{
System.out.print((y+1)+"*"+(x+1)+"="+(y+1)*(x+1)+"\t");//制表符,能对齐数据,有表格线
}
System.out.println();
}
}
}
|
|