switch (job) { case"局长":Console.WriteLine("发双黄月饼");break;
case "处长":Console.WriteLine("发蛋黄月饼");break;
case "科长":Console.WriteLine("发普通月饼");break;
case "员工":Console.WriteLine("没有");break;
default: Console.WriteLine("运算符出错"); break;
case "处长":Console.WriteLine("发蛋黄月饼");break;
case "科长":Console.WriteLine("发普通月饼");break;
case "员工":Console.WriteLine("没有");break;
default: Console.WriteLine("运算符出错"); break;
2017-09-23
for(int x=0;x<7;x++){
for(int y=0;y<7;y++){
if(x==y||y==6-x){
Console.Write("o");
}else{
Console.Write(".");
}} Console.WriteLine();
for(int y=0;y<7;y++){
if(x==y||y==6-x){
Console.Write("o");
}else{
Console.Write(".");
}} Console.WriteLine();
string[] n={"景珍","林惠洋","成蓉","洪南昌","龙玉民","单江开","田武山","王三明"};
int[] s={90,65,88,70,46,81,100,68};
int sum=0;
foreach(int x in s) sum+=x;
double avg = sum/s.Length;
Console.WriteLine("平均分是"+avg+",高于平均分的有:");
for(int i=0;i<s.Length;i++) if(s[i]>avg) Console.Write(n[i]+" ");
int[] s={90,65,88,70,46,81,100,68};
int sum=0;
foreach(int x in s) sum+=x;
double avg = sum/s.Length;
Console.WriteLine("平均分是"+avg+",高于平均分的有:");
for(int i=0;i<s.Length;i++) if(s[i]>avg) Console.Write(n[i]+" ");
string[] name = {"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] score = {89,90,98,56,60,91,93,85};
int key = -1;
if (name.Length==score.Length) for(int i=0; i<score.Length; i++) key = (key<0||score[i]>score[key])?i:key;
if(key>=0) Console.WriteLine("分数最高的是{0},分数是{1}",name[key],score[key]);
int[] score = {89,90,98,56,60,91,93,85};
int key = -1;
if (name.Length==score.Length) for(int i=0; i<score.Length; i++) key = (key<0||score[i]>score[key])?i:key;
if(key>=0) Console.WriteLine("分数最高的是{0},分数是{1}",name[key],score[key]);
最新回答 / 慕粉1356016785
char[,] ch = { {'我','是','软'},{'件','工','程'},{'师','啦','!'}{‘加’,‘名’,‘子’}};
2017-09-21
学习是一条坎坷而又漫长的路,种种滋味只有你自己经历过才能体会,学习没有捷径可走,大家不要像我一样,这样去实现Console.WriteLine("男孩叫"+girl+" 女孩叫"+boy);
2017-09-20