運(yùn)行成功,輸出失敗,是哪的問題
using System;
using System.Collections.Generic;
using System.Text;
namespace projGetMaxScore
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ?string[] name={"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關(guān)欣"};?
? ? ? ? ? ?int[] sorce={89,90,98,56,60,91,93,85};
? ? ? ? ? ?int max=0;
? ? ? ? ? ?int i=0;
? ? ? ? ? ?for(int x=0;x<sorce.Length;x++)
? ? ? ? ? ?{
? ? ? ? ? ? ? ?if(sorce[x]>max)
? ? ? ? ? ? ? ?{
? ? ? ? ? ? ? ? ? ?max=sorce[x];
? ? ? ? ? ? ? ? ? ?i=x;
? ? ? ? ? ? ? ?}
? ? ? ? ? ?}
? ? ? ? ? ?Console.WriteLine("分?jǐn)?shù)最高的是"+name[i]+",分?jǐn)?shù)是"+max);
? ? ? ? }
? ? }
}
2022-12-21
此例WritrLine輸出的逗號要用中文。。。
2022-12-01
標(biāo)點(diǎn)符號錯(cuò)了