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("没有礼品"); }
大小写都验证............
在这里,为了实现代码的高效性,若在||的左边已经判断为true,这时候就不用在判断||的右边,最终都是true。同理,如果已经判断&&的左边为false,后面就不用判断了,结果为false
//懂的自然懂
//懂的自然懂
2018-01-09
string[] name = {"景珍", ...};
int[] score = {90,...};
double seq = 0;
string pass = null;
foreach (int x in score)
{
seq = x + seq;
}
seq = seq/score.Length;
for (int i=0;i<score.Length;i++)
if (score[i]>seq)
{
pass=pass+name[i]+" ";
}
Console.WriteLine("平均分是"+ seq +",高于平均分的有:");
Console.Write(pass);
int[] score = {90,...};
double seq = 0;
string pass = null;
foreach (int x in score)
{
seq = x + seq;
}
seq = seq/score.Length;
for (int i=0;i<score.Length;i++)
if (score[i]>seq)
{
pass=pass+name[i]+" ";
}
Console.WriteLine("平均分是"+ seq +",高于平均分的有:");
Console.Write(pass);