string[]name=new string[]{"景珍","林惠洋","成蓉","洪南昌","龍玉民","單江開","田武山","王三明"};
int[]score=new int[]{90,65,88,70,46,81,100,68};
int a=0;
foreach(int x in score)
a+=x;
a/=score.Length;
Console.WriteLine("平均分是{0},高于平均分的有:",a);
for(int x=0;x<score.Length;x++)
if(score[x]>a)
Console.Write(name[x]+' ');
int[]score=new int[]{90,65,88,70,46,81,100,68};
int a=0;
foreach(int x in score)
a+=x;
a/=score.Length;
Console.WriteLine("平均分是{0},高于平均分的有:",a);
for(int x=0;x<score.Length;x++)
if(score[x]>a)
Console.Write(name[x]+' ');
如鵬【免費視頻教程】大型網站技術揭秘,人人都可學會的www.rupeng.com/Courses/Chapter/299
2015-11-11
如鵬網最新【免費視頻教程】大型網站技術揭秘,人人都可學會http://www.rupeng.com/Courses/Chapter/299
2015-11-11
如鵬網最新【免費視頻教程】大型網站技術揭秘,人人都可學會http://www.rupeng.com/Courses/Chapter/299
2015-11-11
double money = 60000.00;
if(money>=100000.00){Console.LineWrite("恭喜您獲得了一臺微波爐!");}
else if(money<100000&&money>=50000){Console.LineWrite("恭喜您獲得了一套茶具");}
else if(money<50000&&money>=10000){Console.LineWrite("恭喜您獲得了一袋大米!");}
else{Console.LineWrite("不好意思,請您滾");}
if(money>=100000.00){Console.LineWrite("恭喜您獲得了一臺微波爐!");}
else if(money<100000&&money>=50000){Console.LineWrite("恭喜您獲得了一套茶具");}
else if(money<50000&&money>=10000){Console.LineWrite("恭喜您獲得了一袋大米!");}
else{Console.LineWrite("不好意思,請您滾");}