看了半天原來跟我寫的一樣啊0.0
int maxpeople = 0;
int maxscore = 0;
for(int i = 0 ;i<score.Length;i++){
if (score[i]>maxscore){
maxscore = score[i];
maxpeople = i;
}
int maxpeople = 0;
int maxscore = 0;
for(int i = 0 ;i<score.Length;i++){
if (score[i]>maxscore){
maxscore = score[i];
maxpeople = i;
}
2017-09-28
string[]names={"A","B","C","D","E","F","G"};
int[] score = new int[] {89,39,100,51,94,65,70 };
Console.Write("不及格的有:");
for (int i = 0; i <names.Length ; i++)
{
if(score[i]<60 )
Console.Write(names[i]+",");
}
int[] score = new int[] {89,39,100,51,94,65,70 };
Console.Write("不及格的有:");
for (int i = 0; i <names.Length ; i++)
{
if(score[i]<60 )
Console.Write(names[i]+",");
}
2017-09-27
命名空間中包含若干各類,mian方法是C#程序的入口,運行一個程序的命令是conslse.write
2017-09-23