for(int i=1;i<10;i++)
{
int spc=5-i;
if(spc<0)spc=-spc;
for(int j=0;j<spc;j++)System.out.print(' ');
for(int j=0;j<9-2*spc;j++)System.out.print('*');
for(int j=0;j<spc;j++)System.out.print(' ');
}
{
int spc=5-i;
if(spc<0)spc=-spc;
for(int j=0;j<spc;j++)System.out.print(' ');
for(int j=0;j<9-2*spc;j++)System.out.print('*');
for(int j=0;j<spc;j++)System.out.print(' ');
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货