string[] name = {"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關欣"};
int[] score = {89,90,98,56,60,91,93,85};
int max=0;
for(int i=0;i<score.Length;i++)
{ max= score[i]>score[max]?i:max;}
Console.Write("分數最高的是{0},分數是{1}",name[max],score[max]);
}
int[] score = {89,90,98,56,60,91,93,85};
int max=0;
for(int i=0;i<score.Length;i++)
{ max= score[i]>score[max]?i:max;}
Console.Write("分數最高的是{0},分數是{1}",name[max],score[max]);
}
int x;//循環計數變量
x=5;
while (true)//行② 請填寫循環條件
{
Console.Write("加油!");
x-=1;
if(x<1)break;
}
兩個while我都這么過的。。有點坑哦 哈哈啊
x=5;
while (true)//行② 請填寫循環條件
{
Console.Write("加油!");
x-=1;
if(x<1)break;
}
兩個while我都這么過的。。有點坑哦 哈哈啊
int year = 2015;//年份
string text;//請填寫代碼
text=(year%4)==0?"閏年":"平年";
Console.WriteLine("今年是{0}",text)
string text;//請填寫代碼
text=(year%4)==0?"閏年":"平年";
Console.WriteLine("今年是{0}",text)
2017-10-06