最赞回答 / 以雪之名
static void Main(string[] args) { Console.Write("蜀国”五虎将”是:"); string[] names = new string[] { "关羽", "张飞", "赵云", "马超", "黄忠" }; for (int i = 0; i < names.Length; i++) { Console.Wri...
2016-12-04
string[] name=new string[8] {"吴松", "钱东宇", "伏晨", "陈陆", "周蕊", "林日鹏", "何昆", "关欣"};
int[] num=new int[8] {29, 90, 98, 56, 60, 91, 93, 85};
int max, index=0;max =num[0];for (int i=1; i<8; i++){if(num[i]>max){max=num[i];index =i;}}
Console.WriteLine("分数最高的是{0},分数是{1}", name[index], max);我自己编程软件商都对了这里就显示错误
int[] num=new int[8] {29, 90, 98, 56, 60, 91, 93, 85};
int max, index=0;max =num[0];for (int i=1; i<8; i++){if(num[i]>max){max=num[i];index =i;}}
Console.WriteLine("分数最高的是{0},分数是{1}", name[index], max);我自己编程软件商都对了这里就显示错误
if(salary>=price)
{
Console.WritenLine("这月工资够买手机!");
}
else
{
Console.WriteLine("这月工资不够买手机!");
}
{
Console.WritenLine("这月工资够买手机!");
}
else
{
Console.WriteLine("这月工资不够买手机!");
}
namespace Test
{
class Program
{
static void Main(string[] args)
{
int age = 4;//年龄
if (age < 6 || age > 60)
Console.WriteLine("请坐爱心座!");
else
Console.WriteLine("请坚持一下!");
}
}
}
{
class Program
{
static void Main(string[] args)
{
int age = 4;//年龄
if (age < 6 || age > 60)
Console.WriteLine("请坐爱心座!");
else
Console.WriteLine("请坚持一下!");
}
}
}
2016-12-01