美文网首页
2018-12-19

2018-12-19

作者: 柏建春 | 来源:发表于2018-12-19 14:18 被阅读0次

#代码
using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

    class Program

    {

        static void Main(string[] args)

        {

            int index = 0;

            int[] points=new int[8]{18,25,7,36,13,2,89,63};

            int min = points[0];

            for (int i = 0; i < points.Length; i++)

            {

                if (min > points[i])

                {

                    min = points[i];

                    index = i;

                }

            }

            Console.WriteLine("最低积分为{0},其下标为{1}。", min, index);

            Console.ReadKey();

        }

    }

}

#效果

相关文章

网友评论

      本文标题:2018-12-19

      本文链接:https://www.haomeiwen.com/subject/kuldkqtx.html