Created
June 14, 2016 23:07
-
-
Save mneko22/d6aa5d58fa749dc3223579ed753f347b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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