求大佬指導哪里錯了,一直沒找出來
? ? ? ? ? ? int[]num=new int[]{89,90,98,56,60,91,93,85};
? ? ? ? ? ? string[] xingming = new string[] {"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關(guān)欣"};
? ? ? ? ? ? int max=num[0];
? ? ? ? ? ? for(int x=1,x < num.Length,x++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ?if(num[i]>max)
? ? ? ? ? ? ? ? max=num[i];
? ? ? ? ? ? }
? ? ? ? ? ? Console.Write(max);
? ? ? ? ? ??
Program.cs(14,26):?error?CS1525:?Unexpected?symbol?`<',?expecting?`)',?`,',?`;',?or?`=' Program.cs(14,40):?error?CS1525:?Unexpected?symbol?`++',?expecting?`)',?`,',?`;',?or?`=' Program.cs(18,13):?error?CS1525:?Unexpected?symbol?`}' Program.cs(18,12):?error?CS1525:?Unexpected?symbol?`}',?expecting?`)',?`,',?`;',?or?`=' Program.cs(19,26):?error?CS1519:?Unexpected?symbol?`('?in?class,?struct,?or?interface?member?declaration Program.cs(19,30):?error?CS1519:?Unexpected?symbol?`)'?in?class,?struct,?or?interface?member?declaration Program.cs(23,0):?error?CS1525:?Unexpected?symbol?`}' Compilation?failed:?7?error(s),?0?warnings
2021-09-19
? ? ? ? ? ?int[]num=new int[]{89,90,98,56,60,91,93,85};
? ? ? ? ? ? string[] xingming = new string[] {"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關(guān)欣"};
? ? ? ? ? ?int max=num[0];
? ? ? ? ? ?string name = xingming[0];
? ? ? ? ??
? ? ? ? ? ?for (int i=0;i<num.Length;i++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ?if(num[i]>max)
? ? ? ? ? ? ? ?{
? ? ? ? ? ? ? ? ? ?max=num[i];
? ? ? ? ? ? ? ? ? ?name=xingming[i];
? ? ? ? ? ? ? ?}
? ? ? ? ? ? ? ??
? ? ? ? ? ? }
? ? ? ? ? ? Console.Write("分數(shù)最高的是{0},分數(shù)是{1}",name,max);
在你的基礎(chǔ)上改的,問題太多了,你自己找一下吧,最好把前面的課程再看一遍。