最赞回答 / L1Rui_
for ( int GJ = 0; GJ <= 20; GJ++) { for ( int MJ = 0; MJ <=33; MJ++) { for (int XJ = 0; XJ <= 300;XJ++ ) if (5 * GJ + 3 * MJ + XJ / 3.0 == 100&&GJ+MJ+XJ=...
2018-04-18
string[,] score = new string[2,8]{{"吴松","钱东宇","伏晨","陈陆","周蕊","林日鹏","何昆","关欣"},{"89","90","98","56","60","91","93","85"}};
string x = "0";
int y =0;
for (int i =0; i<8; i++) {
if (int.Parse(x) < int.Parse(score[1,i])) {
x = score[1,i];
y=i;
}
}
Console.Write("分数最高的是{0},分数是{1}", score[0,y],x);
string x = "0";
int y =0;
for (int i =0; i<8; i++) {
if (int.Parse(x) < int.Parse(score[1,i])) {
x = score[1,i];
y=i;
}
}
Console.Write("分数最高的是{0},分数是{1}", score[0,y],x);
public class Student
{
public Student(string name, int score)
{
Name = name;
Score = score;
}
public string Name { get; set; }
public int Score { get; set; }
}
}
{
public Student(string name, int score)
{
Name = name;
Score = score;
}
public string Name { get; set; }
public int Score { get; set; }
}
}
Console.Write("分数最高的是");
foreach(var student in hightestScoreStudents)
{
Console.WriteLine("{0},分数是{1}", student.Name, student.Score);
}
}
}
foreach(var student in hightestScoreStudents)
{
Console.WriteLine("{0},分数是{1}", student.Name, student.Score);
}
}
}
public static void TheHightestScoreStudent(List<Student> students)
{
var hightestScoreStudents = from student in students
where student.Score ==students.Max(x => x.Score)
select student;
{
var hightestScoreStudents = from student in students
where student.Score ==students.Max(x => x.Score)
select student;
new Student("陈陆",56),
new Student("周蕊",60),
new Student("林日鹏",91),
new Student("何昆",93),
new Student("关欣",85)
};
TheHightestScoreStudent(students);
}
new Student("周蕊",60),
new Student("林日鹏",91),
new Student("何昆",93),
new Student("关欣",85)
};
TheHightestScoreStudent(students);
}
namespace projGetMaxScore
{
class Program
{
static void Main(string[] args)
{
List<Student> students = new List<Student>{
new Student("吴松",89),
new Student("钱冬宇",90),
new Student("伏晨",98),
{
class Program
{
static void Main(string[] args)
{
List<Student> students = new List<Student>{
new Student("吴松",89),
new Student("钱冬宇",90),
new Student("伏晨",98),
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Linq;
最新回答 / qq_慕的地6528064
这样 for (int i = 1; i < 100; i++) { Console.Write(i+"\t"); if (i%5==0) { Console.WriteLine() ; } }
2018-04-18
最新回答 / 粗实而夜雨
我复制了你的代码,重新跑了一遍发现的错误就是你的代码中有几个分号写成了中文的格式,你改下试试using System;using System.Collections.Generic;using System.Text;namespace Test{ class Program { static void Main(string[] args) { string boy = "秀丽";//男孩名字 ...
2018-04-16