誰告訴我錯哪了?
using System;
using System.Collections.Generic;
using System.Text;
namespace projGetMaxScore
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ? int[] arr={89,90,98,56,60,91,93,85};
? ? ? ? ? ? string[] name = {"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關欣" };
? ? ? ? ? ? int max =arr[0];
? ? ? ? ? ? int j = 0;
? ? ? ? ? ?for(int i=1;i<arr.Length;i++)
? ? ? ? ? ?{?
? ? ? ? ? ? ? ?if(arr[i]>max)
? ? ? ? ? ? ? ?{
? ? ? ? ? ? ? ? ? ? ?max=arr[i];
? ? ? ? ? ? ? ? ? ? ?j = i;
? ? ? ? ? ? ? ?}
? ? ? ? ? ?}
? ? ? ? ? ?Console.WriteLine("分數最高的是"+name[j]+",分數是"+arr[j]);
? ? ? ? }
? ? }
}
2019-04-25
逗號是英文的了