int sum;
sum=_num1+_num2;//求和
Console.WriteLine("和是{0}",sum);//打印结果
sum=_num1+_num2;//求和
Console.WriteLine("和是{0}",sum);//打印结果
2017-06-21
string[] no = new string[8];
for (int j=0;j< no.Length;j++)
{
if(score[j]>avg)
{
no[j] = name[j];
Console.Write(no[j]+" ");
}
}
//Console.ReadLine();
for (int j=0;j< no.Length;j++)
{
if(score[j]>avg)
{
no[j] = name[j];
Console.Write(no[j]+" ");
}
}
//Console.ReadLine();
string[] name = { "景珍", "林惠洋", "成蓉", "洪南昌", "龙玉民", "单江开", "田武山", "王三明" };
int[] score = { 90, 65, 88, 70, 46, 81, 100, 68 };
int sum = 0;
for (int i = 0; i < score.Length; i++)
{sum += score[i]; }
int avg = sum / score.Length;
Console.WriteLine("平均分是{0},高于平均分的有:", avg);
int[] score = { 90, 65, 88, 70, 46, 81, 100, 68 };
int sum = 0;
for (int i = 0; i < score.Length; i++)
{sum += score[i]; }
int avg = sum / score.Length;
Console.WriteLine("平均分是{0},高于平均分的有:", avg);