标题:数组输出为什么错了?
取消只看楼主
wu2782641803
Rank: 2
等 级:论坛游民
帖 子:65
专家分:46
注 册:2013-10-28
结帖率:88.24%
已结贴  问题点数:20 回复次数:0 
数组输出为什么错了?
public class Wu {
    public static void main(String [] args)
    {

    int x=0,y=0;
    int array[]=new int [100];
    for(int i=1;i<=100;i++)
        {array[i]=y+i;
        }
    for(int n:array)
    {    x=x+n;
   
    }
     System.out.println(x);
     
    }
    }
搜索更多相关主题的帖子: public 
2014-04-16 16:19



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-430182-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.918654 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved