case"局长": Console.Write("发双黄月饼"); break;
case"处长": Console.Write("发蛋黄月饼"); break;
case"科长": Console.Write("发枣泥月饼"); break;
default: Console.Write("发五仁月饼"); break;
case"处长": Console.Write("发蛋黄月饼"); break;
case"科长": Console.Write("发枣泥月饼"); break;
default: Console.Write("发五仁月饼"); break;
2017-11-06
if(price<=salary)//请在这里补充条件判断
{
Console.WriteLine("这月工资够买手机!");
}
else
{
Console.WriteLine("买你妈!");
}
{
Console.WriteLine("这月工资够买手机!");
}
else
{
Console.WriteLine("买你妈!");
}
foreach(int x in num)
{
if(x%7==0)
{
Console.WriteLine(x);
}else{
flag=true;
}
}
if(flag)
{Console.WriteLine("没有7的整倍数");}
{
if(x%7==0)
{
Console.WriteLine(x);
}else{
flag=true;
}
}
if(flag)
{Console.WriteLine("没有7的整倍数");}
int k=7;
for(int i=1;i<=7;i++)
{
for(int j=1;j<=7;j++)
{ if(i==j|| k==j){Console.Write(i);}
else {Console.Write("0");}
}
k--;Console.WriteLine();
}
for(int i=1;i<=7;i++)
{
for(int j=1;j<=7;j++)
{ if(i==j|| k==j){Console.Write(i);}
else {Console.Write("0");}
}
k--;Console.WriteLine();
}
int[] score = new int[] {89,39,100,51,94,65,70 };//分数
Console.Write("不及格的有:");
for (int i = 0; i < score.Length ; i++)
{
if( score[i]<60 )//筛选条件
Console.Write(score[i]+",");
}
Console.Write("不及格的有:");
for (int i = 0; i < score.Length ; i++)
{
if( score[i]<60 )//筛选条件
Console.Write(score[i]+",");
}
2017-11-04