这位同学,default拼写错了
盼盼不乖
case"局长": Console.Write("发双黄月饼"); break;
case"处长": Console.Write("发蛋黄月饼"); break;
case"科长": Console.Write("发枣泥月饼"); break;
defualt: Console.Write("发五仁月饼"); break;
为什么还是不对,求高手指点
时间: 2016-09-04
盼盼不乖
case"局长": Console.Write("发双黄月饼"); break;
case"处长": Console.Write("发蛋黄月饼"); break;
case"科长": Console.Write("发枣泥月饼"); break;
defualt: Console.Write("发五仁月饼"); break;
为什么还是不对,求高手指点
时间: 2016-09-04
2017-07-07
switch (job)
{
"局长": {Console.Write("发双黄月饼"); break;}
"处长": {Console.Write("发蛋黄月饼"); break;}
"科长": {Console.Write("发枣泥月饼"); break;}
default: {Console.Write("发五仁月饼"); break;}
}
这也不对吗
{
"局长": {Console.Write("发双黄月饼"); break;}
"处长": {Console.Write("发蛋黄月饼"); break;}
"科长": {Console.Write("发枣泥月饼"); break;}
default: {Console.Write("发五仁月饼"); break;}
}
这也不对吗
2017-07-07
int x = 5;
int y = 6;
if (x >= y){
if (x >= 5)
Console.WriteLine("5");}
else if (y >= 6){
Console.WriteLine("6");}
else
{Console.WriteLine("7");}
int y = 6;
if (x >= y){
if (x >= 5)
Console.WriteLine("5");}
else if (y >= 6){
Console.WriteLine("6");}
else
{Console.WriteLine("7");}
2017-07-06