static void Main(string[] args)
{
string job = "科员";
if (job == "局长")
{
else//请输入
{
Console.WriteLine("发五仁月饼");
}
Console.ReadLine(); //让vs调试后可以看清结果,按下任意键才关闭命令提示符窗口
{
string job = "科员";
if (job == "局长")
{
else//请输入
{
Console.WriteLine("发五仁月饼");
}
Console.ReadLine(); //让vs调试后可以看清结果,按下任意键才关闭命令提示符窗口
2015-10-07
Console.WriteLine("发蛋黄月饼");
}
else if (job == "科长")//请输入
{
Console.WriteLine("发枣泥月饼");
}
else//请输入
{
Console.WriteLine("发五仁月饼");
}
}
else if (job == "科长")//请输入
{
Console.WriteLine("发枣泥月饼");
}
else//请输入
{
Console.WriteLine("发五仁月饼");
}
2015-10-06
double tempvalue = 0;
//求最大
for (int i = 0; i < scores.Length; i++){
if (tempvalue > scores[i]){
continue;
}else{
tempvalue = scores[i];
}
}
for (int i = 0; i < scores.Length; i++){
if (tempvalue == scores[i]){
Console.WriteLine("分数最高的是{0},分数是{1}", names[i],scores[i]);
}
}
Console.ReadKey();
//求最大
for (int i = 0; i < scores.Length; i++){
if (tempvalue > scores[i]){
continue;
}else{
tempvalue = scores[i];
}
}
for (int i = 0; i < scores.Length; i++){
if (tempvalue == scores[i]){
Console.WriteLine("分数最高的是{0},分数是{1}", names[i],scores[i]);
}
}
Console.ReadKey();