啊库拉玛榻榻
2018-08-30 11:51
using System.Text;
namespace projAboveAvg
{
class Program
{
static void Main(string[] args)
{
string[] name = new string[8]{ "景珍", "林惠洋", "成蓉", "洪南昌", "龙玉民", "单江开", "田武山", "王三明" };
int[] score = new int[8] { 90, 65, 88, 70, 46, 81, 100, 68 };
int sum = 0;
int avg,a,b;
for (a = 0; a < score.Length; a++)
{
sum = score[a] + sum;
}
avg = sum / score.Length;
Console.WriteLine("平均分是{0},高于平均分的有:",avg);
for (b = 0; b < score.Length; b++)
{
if (score[b] > avg)
Console.Write(name[b]+" ");
}
}
}
}
运行成功输出错误。。。为啥,字符串的逗号和冒号是中文的
打印的符号改成中文试试。
C#开发轻松入门
254118 学习 · 1459 问题
相似问题