//输入10人的分数,求排序最高分,最低分,平均分, Console.WriteLine("请输入10位同学的成绩:"); int[]fenshu=new int [10]; double ave = 0; double sum = 0; int min = 0; int max = 0; for (int i = 0; i < 10; i++) { fenshu[i] = int.Parse(Console .ReadLine ()); sum =sum +fenshu [i]; if (i == 0) { min=fenshu [0]; max =fenshu [0];} else { if( min >fenshu [i ]) min =fenshu [i]; if (max<fenshu [i]) max =fenshu [i]; } ave = sum / 10; } Console.Write("ave=" + ave +" "); Console.Write("sum=" + sum + " "); Console.Write("max=" + max + " "); Console.Write("min=" + min + " "); Console.ReadLine();