07/11/26 21:16:55
>>216
「読む」の意味がいまいちわからないけどこんなんかな
using System;
class Sample{
public static void Main(){
int[] point = new int[5];
int max=int.MinValue, min=int.MaxValue;
double avg=0.0;
try{
for(int i=0; i<5; i++){
Console.Write("{0}人目の得点->", i+1);
point[i] = int.Parse(Console.ReadLine());
}
for(int i=0; i<5; i++){
if(max < point[i]) max = point[i];
if(min > point[i]) min = point[i];
avg += point[i];
}
Console.WriteLine("最高点:{0}点\n最低点:{1}点\n平均点:{2}点", max, min, avg/5);
}
catch{
Console.WriteLine("なんか例外");
}
}
}