poisonrose
2019-04-25 18:07
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]);
}
}
}
逗号是英文的了
C#开发轻松入门
254118 学习 · 1459 问题
相似问题