求大神, c#的問題
using System;
using System.Collections.Generic;
using System.Text;
namespace projGetMaxScore
{
? ? class Program
? ? {
? ? ? ? static void Main(string[] args)
? ? ? ? {
? ? ? ? ? ?string[] name={"吳松","錢東宇","伏晨","陳陸","周蕊","林日鵬","何昆","關(guān)欣"};
? ? ? ? ? ?int[] score={89,90,98,56,60,91,93,85};
? ? ? ? ? ? int max = score[0];
? ? ? ? ? ? int nameindex = 0;
? ? ? ? ? ? for(int i = 0; i < score.Length; i++)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? if(score[i] > max)
? ? ? ? ? ? ? ? {
? ? ? ? ? ? ? ? ? ? max = score[i];
? ? ? ? ? ? ? ? ? ? nameindex = i;
? ? ? ? ? ? ? ? }
? ? ? ? ? ? }
? ? ? ? ? ? Console.WriteLine(name(nameindex));
? ? ? ? }
? ? }
}
怎么是輸出?????98
2022-03-26
可以在完善,判斷prompt是選擇什么,來執(zhí)行操作。可以把html中的css樣式代碼放入style.css文件中可以,也就是style.css是寫css樣式代碼的。
2017-06-23
你好,復(fù)制代碼直接運行報錯,出錯原因是最后的那一行的代碼錯誤,改成:
?代碼可以運行,輸出“伏晨”,如果需要輸出對應(yīng)的分數(shù)的話,可以改成
如果回答的不對,或者不明白,可以回復(fù)我,祝你學習順利。
2017-04-19
最后應(yīng)該是 Console.WriteLine(name[nameindex]);吧? 我在vs中運行沒問題 ,輸出伏晨