电子灵魂

golang,go,C#,JAVA,PYTHON,PHP

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace rmb
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] score = new int[] { 75, 65, 85, 85, 95, 65, 46, 46, 12, 46, 50, 125, 55, 66, 66, 99, 87, 89, 91, 95 };
            int sumscore = 0;
            foreach (var item in score)
            {
                sumscore += item;
            }
            int sumad = sumscore / score.Length;
            Console.WriteLine("平均成绩是{0}", sumad);
            Console.ReadKey();
        }
    }
}
posted on 2015-04-29 10:24  conncent  阅读(7165)  评论(0编辑  收藏  举报