标题:老师帮忙 解题 如何方法中引用数组
取消只看楼主
chen1jing1
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2014-1-29
结帖率:100%
已结贴  问题点数:20 回复次数:1 
老师帮忙 解题 如何方法中引用数组
public static int Paixu( int shuzu)
        {
            
        for (int a=0;a<shuzu.Length ;a++ )
            {
            int zuida;
            zuida = shuzu[0];
                if (zuida < shuzu[a])
                {
                    zuida = shuzu[a];
                }
            }
        return zuida;
        }
        
        static void Main(string[] args)
        {
            int[] shuzu = new int[5];
            for (int a=0;a<shuzu.Length ;a++ )
            {
                Console.WriteLine("请输入数值");
                shuzu[a] = Convert.ToInt32(Console.ReadLine());
            }
            int _zuida =zuida;
            Console.WriteLine("最大数值为{0}",_zuida);
搜索更多相关主题的帖子: public return 如何 
2014-02-22 14:26
chen1jing1
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2014-1-29
得分:0 
谢谢   真的 感谢    原来  调用数组是这样写的  谢谢 哈   我看的 视频中没有这个所以问的 谢谢你哈
2014-02-23 09:48



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




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

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