50,526
社区成员
发帖
与我相关
我的任务
分享
public class DoubleRecurve
{
public static final int COUNT=6;
public static void main(String[] args)
{
for(int i=0;i<COUNT;i++)
{
for(int j=0;j<=i;j++)
{
System.out.print(""+(j+1)+" ");//注意,这不要用println().
}
System.out.println();
}
}
}
for(int i = 1; i<=6 ; i++){
for(int j = 1; j<=i ; j++){
System.out.print(j+" ");
}
System.out.println();
}