string[] names=new string[]{"吴松",...};
int[] scores=new int[]{29,...};
int score=scores[0];
int j;
for(int i=0;i<scores.Length;i++){
if(scores[i]>score){
score=scores[i];
j=i;
}
}
Console.Write("分数最高的是{0}","分数是{1}",names[j],score)
int[] scores=new int[]{29,...};
int score=scores[0];
int j;
for(int i=0;i<scores.Length;i++){
if(scores[i]>score){
score=scores[i];
j=i;
}
}
Console.Write("分数最高的是{0}","分数是{1}",names[j],score)
{
static void Main(string[] args)
{
for (int y = 1; y <= 7; y++)
{
for (int x=1;x<=y;x++)
{
Console.Write(x);
}
Console.WriteLine();//换行
}
}
}
}
我觉得没毛病啊
static void Main(string[] args)
{
for (int y = 1; y <= 7; y++)
{
for (int x=1;x<=y;x++)
{
Console.Write(x);
}
Console.WriteLine();//换行
}
}
}
}
我觉得没毛病啊
2017-08-17
Console.WriteLine("{0}{1}{2}",ch[1,1],ch[1,2],ch[2,0]); 完全没搞懂最后的索引纳闷来的
2017-08-16
int year = 2015;//年份
string text;
text = ((year % 4) == 0 && (year % 100 != 0) || (year % 400 == 0)) ? "闰年" : "平年";
Console.Write("今年是{0}", text);
string text;
text = ((year % 4) == 0 && (year % 100 != 0) || (year % 400 == 0)) ? "闰年" : "平年";
Console.Write("今年是{0}", text);
2017-08-16