aaaaaaaabaaaaaaaa
aaaaaaabbbaaaaaaa
aaaaaabbbbbaaaaaa
aaaaabbbbbbbaaaaa
aaaabbbbbbbbbaaaa
aaaaabbbbbbbaaaaa
aaaaaabbbbbaaaaaa
aaaaaaabbbaaaaaaa
aaaaaaaabaaaaaaaa
补充a是空白,b是要输出的图形!b依此为***********的零形图案!
參考答案:class test
{
public static void main(String[] args)
{
int i,j,k;
for(i=0;i<=4;i++)
{
for(j=0;j<=3-i;j++)
System.out.print(" ");
for(k=0;k<=2*i;k++)
System.out.print("*");
System.out.println();
}
for(i=0;i<=3;i++)
{
for(j=0;j<=i;j++)
System.out.print(" ");
for(k=0;k<7-2*i;k++)
System.out.print("*");
System.out.println();
}
}
}