同學們注意審題兩個數組
string[] name = new string[] {"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關欣"};
int[] score = new int[] { 89,90,98,56,60,91,93,85 };
int max = 0;
string ws= "";
for (int a=0;a<= 7;a++)
{
if (max<score[a])
{
max =score[a];
ws =name[a];
}
}
Console.Write("分數最高的是{0},分數是{1},", ws,max);
string[] name = new string[] {"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關欣"};
int[] score = new int[] { 89,90,98,56,60,91,93,85 };
int max = 0;
string ws= "";
for (int a=0;a<= 7;a++)
{
if (max<score[a])
{
max =score[a];
ws =name[a];
}
}
Console.Write("分數最高的是{0},分數是{1},", ws,max);
string str=Console.ReadLine();
int y=Convert.TonInt32(str);
if(y<6 || y>60)
Console.WriteLine("請坐愛心座"):
else
Console.WriteLine("請堅持一下"):
int y=Convert.TonInt32(str);
if(y<6 || y>60)
Console.WriteLine("請坐愛心座"):
else
Console.WriteLine("請堅持一下"):
2020-09-07
已采納回答 / qq_Azazel_dCMSTX
string[] job =new string[]{"經理","項目主管","技術總監","財務主管"};new string后面少了個”[]“
2020-08-29
string text = ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ? "閏年" : "平年";
2020-08-17
//閏年的判斷條件格式
(year % 400 == 0 || year % 4 == 0 && year % 100 != 0)
//如果 年能被400整除 或者 年能被4整除 并且年不能被100整除。
(year % 400 == 0 || year % 4 == 0 && year % 100 != 0)
//如果 年能被400整除 或者 年能被4整除 并且年不能被100整除。
2020-08-15