C/C++の宿題を片付けます 100at TECH
C/C++の宿題を片付けます 100 - 暇つぶし2ch238:デフォルトの名無しさん
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("なんか例外");
}
}
}



次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch