码迷,mamicode.com
首页 > 编程语言 > 详细

求平均成绩使用二维数组(网上找的,仅自用,非原创)

时间:2018-04-07 16:10:13      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:成绩   adl   网上   eof   输入   ati   read   line   console   

using System;
class AverageofScore
{
public static void Main()
{
int[,] student_score=new int [4,5];
int temp;
for(int i=0;i<=3;i++)
{
temp=0;
for(int j=0;j<=4;j++)
{
Console.WriteLine ("请输入第{0}个学生的第{1}门功课:",i+1,j+1);
student_score[i,j]=int.Parse (Console.ReadLine ());
temp+=student_score[i,j];
}
Console.WriteLine ("This student‘s average of score is"+temp/5);
}
}
}

求平均成绩使用二维数组(网上找的,仅自用,非原创)

标签:成绩   adl   网上   eof   输入   ati   read   line   console   

原文地址:https://www.cnblogs.com/hsyv123ve/p/8733309.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!