标签:打印三角形数字图案
public class C3_16
{
public static void main(String[] args)
{
for(int i=1;i<=10;i++)
{
for(int j=1;j<=11-i;j++)
System.out.print(" ");
for(int j=1;j<=i;j++)
{
if(i>=10) System.out.print(+i+" ");
else System.out.print(+i+" ");
}
System.out.println(" ");
}
}
}运行结果:
本文出自 “桑海田 博客专栏” 博客,请务必保留此出处http://10602803.blog.51cto.com/10592803/1683065
标签:打印三角形数字图案
原文地址:http://10602803.blog.51cto.com/10592803/1683065