string[] names=new string[3]{"吳松","錢東宇","伏晨"};
int[] score=new int[3]{89,90,98};
int max=score[0];
string max_name = "吳松";
for(int i=1;i<3;i++)
{
if(score[i]>max)
{
max=score[i];
max_name = names[i];
}
}
Console.Write("分數最高的是" + max_name + ",分數是" + max);
int[] score=new int[3]{89,90,98};
int max=score[0];
string max_name = "吳松";
for(int i=1;i<3;i++)
{
if(score[i]>max)
{
max=score[i];
max_name = names[i];
}
}
Console.Write("分數最高的是" + max_name + ",分數是" + max);
const string CITY = "布宜諾斯艾利斯";//常量,城市
const string NAME = "列奧波爾多·福圖納托·加爾鐵里·卡斯特利";//常量,姓名
Console.WriteLine(NAME + "出生在" + CITY + "的一個工人家庭");//使用常量
Console.ReadLine();
const string NAME = "列奧波爾多·福圖納托·加爾鐵里·卡斯特利";//常量,姓名
Console.WriteLine(NAME + "出生在" + CITY + "的一個工人家庭");//使用常量
Console.ReadLine();