string[] name = {******};
int[] score = {******};
int sum = 0;
int avg;
foreach (int x in score)
{
sum += x;
}
avg = sum / score.Length;
Console.Write("平均分是{0},高于平均分的有:",avg);//坑爹的全角半角和换行,从头坑到尾...
for (int i = 0; i < score.Length; i++)
{
if (score[i] > avg)
{
Console.Write(name[i]+" ");
}
}
int[] score = {******};
int sum = 0;
int avg;
foreach (int x in score)
{
sum += x;
}
avg = sum / score.Length;
Console.Write("平均分是{0},高于平均分的有:",avg);//坑爹的全角半角和换行,从头坑到尾...
for (int i = 0; i < score.Length; i++)
{
if (score[i] > avg)
{
Console.Write(name[i]+" ");
}
}
string[] name = {"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score = {89,90,98,56,60,91,93,85};
for (int i = 100; i >= 0; i--)
{
for (int x = 0; x < score.Length; x++)
{
if (score[x] == i)
{
Console.Write("分数最高的是{0},分数是{1}",name[x],score[x]);
return;
}
}
}
int[] score = {89,90,98,56,60,91,93,85};
for (int i = 100; i >= 0; i--)
{
for (int x = 0; x < score.Length; x++)
{
if (score[x] == i)
{
Console.Write("分数最高的是{0},分数是{1}",name[x],score[x]);
return;
}
}
}
for (int i = 5;i <= 5&&i>=1 ;i-- )//请填写代码
{
Console.WriteLine(i+" ");
}
{
Console.WriteLine(i+" ");
}
2018-01-11
int z = 7;
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
if (y == x || z == x)
{
Console.Write("o");
}
else
{
Console.Write(".");
}
}
Console.WriteLine("");
z--;
}
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
if (y == x || z == x)
{
Console.Write("o");
}
else
{
Console.Write(".");
}
}
Console.WriteLine("");
z--;
}
static void Main(string[] args)
{
int x;
for (int i = 1; i < 13; i++)
{
x = i + 0;
Console.Write("{0}\n", x);
}
{
int x;
for (int i = 1; i < 13; i++)
{
x = i + 0;
Console.Write("{0}\n", x);
}
2018-01-11
string[,] list={{"吴松","29"},{"钱东宇","90"},{"伏晨","98"},{"陈陆","56"},{"周蕊","60"},{"林日鹏","91"},{"何昆","93"},{"关欣","85"}};
string maxNum="0";
string maxName="0";
string maxNum="0";
string maxName="0";
double money = 60000.00;//存款金额
//请在这里补充多重条件判断
if(money >= 100000){ Console.WriteLine(" 送一台微波炉"); }
else if(money < 100000 && money >= 50000){ Console.WriteLine("送一套茶具"); }
else if(money < 50000 && money >= 10000){ Console.WriteLine("没有礼品"); }
大小写都验证............
//请在这里补充多重条件判断
if(money >= 100000){ Console.WriteLine(" 送一台微波炉"); }
else if(money < 100000 && money >= 50000){ Console.WriteLine("送一套茶具"); }
else if(money < 50000 && money >= 10000){ Console.WriteLine("没有礼品"); }
大小写都验证............