Skip to content

Instantly share code, notes, and snippets.

@mneko22
Created June 14, 2016 23:07
Show Gist options
  • Select an option

  • Save mneko22/d6aa5d58fa749dc3223579ed753f347b to your computer and use it in GitHub Desktop.

Select an option

Save mneko22/d6aa5d58fa749dc3223579ed753f347b to your computer and use it in GitHub Desktop.
class Seiseki
{
static void Main(string[] args)
{
ICampusSquare cs = new CampusSquare.CampusSquare(Console.ReadLine(),Console.ReadLine());
IEnumerable < IGrade > grades = cs.GetGrades();
Dictionary<string, int> gradeList = new Dictionary<string, int>();
foreach(IGrade grade in grades)
{
gradeList.Add(grade.Name, grade.GradeNum);
}
Console.WriteLine("-------------------成績がいいやつ------------------");
foreach(KeyValuePair<string, int> grade in gradeList)
{
if (grade.Value == gradeList.Values.Max())
Console.WriteLine(grade.Key);
}
Console.WriteLine("--------------------落としたやつ-------------------");
foreach (KeyValuePair<string, int> grade in gradeList)
{
if (grade.Value == gradeList.Values.Min())
Console.WriteLine(grade.Key);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment