string[] xx={"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"};
int[] x = {89,90,98,56,60,91,93,85 };
int y = 0;
for(int a=0;a<xx.Length;a++)
{
if (y < x[a])
y = x[a];
}
for (int a = 0; a < xx.Length; a++)
{
if (y == x[a])
Console.Write("分数最高的是"+xx[a]+",分数是"+x[a]);
}
int[] x = {89,90,98,56,60,91,93,85 };
int y = 0;
for(int a=0;a<xx.Length;a++)
{
if (y < x[a])
y = x[a];
}
for (int a = 0; a < xx.Length; a++)
{
if (y == x[a])
Console.Write("分数最高的是"+xx[a]+",分数是"+x[a]);
}
哈哈,这课讲的听着有意思啊,刚开始学,看着目录讲的类容不多,不知道后面会讲到那些知识。
<h1>看后台开发讲解的 C# 知识好少啊, 希望老师们加快脚步,多整理一些出来</h1>
<h1>看后台开发讲解的 C# 知识好少啊, 希望老师们加快脚步,多整理一些出来</h1>
2016-10-01
string[,] sum = { { "吴松", "89" }, { "钱冬宇", "90" }, { "伏晨", "98" }, { "周蕊", "60" } };
for(int x=0; x<sum.GetLongLength(0);x++)
{
if(sum[x,1]=="98")
{
Console.WriteLine("分数最高的是{0},分数是{1}",sum[x,0],sum[x,1]);
}
for(int x=0; x<sum.GetLongLength(0);x++)
{
if(sum[x,1]=="98")
{
Console.WriteLine("分数最高的是{0},分数是{1}",sum[x,0],sum[x,1]);
}
int year = 2015;//年份
string text;
text = year % 4 == 0?"闰年":"平年";
Console.WriteLine("今年是{0}",text);
string text;
text = year % 4 == 0?"闰年":"平年";
Console.WriteLine("今年是{0}",text);
2016-09-30