重庆鸳鸯力帆集团地址:这个程序的输出结果为什么是那样?

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 02:33:25
public class szcl2
{ public static void main(String args[])
{ int a[]=new int[20];
int i,j;
for (i=0;i<20;i++)
a[i]=0;
int n=10;
for (i=0;i<n;i++)
for (j=0;j<n;j++)
{ a[j]=a[i]+1;
System.out.println(a[n-1]);

}
}
}
二楼的猪,不懂就不要瞎插嘴,看三楼仁兄~~~~

什么样,猪?

程序都有错吧?没有的话
可能是0,0 ,0,0,0,0,0,0,0,1