{
//聲明整型數組,保存一組整數
int[] num = new int[] { 3,34,42,2,11,19,30,55,20};
for(int x=0;x<num.Length;x++)
if num[x]%2==0
Console.WriteLine(num[x]+",");//請完善代碼,循環打印數組中的偶數
}
//聲明整型數組,保存一組整數
int[] num = new int[] { 3,34,42,2,11,19,30,55,20};
for(int x=0;x<num.Length;x++)
if num[x]%2==0
Console.WriteLine(num[x]+",");//請完善代碼,循環打印數組中的偶數
}
for(int i=0;i<score.Length;i++)
{
if(score[i]>maxscore)
{
maxscore=score[i];
x=i;
}
}
Console.Write("分數最高的是{0},分數是{1}",name[x],maxscore);
{
if(score[i]>maxscore)
{
maxscore=score[i];
x=i;
}
}
Console.Write("分數最高的是{0},分數是{1}",name[x],maxscore);
string [] name={"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關欣"};
int [] score={89,90,98,56,60,91,93,85};
int maxscore=0,x=0;
int [] score={89,90,98,56,60,91,93,85};
int maxscore=0,x=0;
Console.WriteLine("{0}{1}{2}",ch[1,1],ch[1,2],ch[2,0]);
2016-10-24