private void Main05() { int x = MyUtility.Read("x? = "); int y = MyUtility.Read("y? = "); Console.WriteLine("Max({0}, {1}) = {2}", x, y, MyUtility.Extremum(MyUtility.Max, x, y)); Console.WriteLine("Min({0}, {1}) = {2}", x, y, MyUtility.Extremum(MyUtility.Min, x, y)); }
private void Main04() { int x = MyUtility.Read("x? = "); int y = MyUtility.Read("y? = "); Console.WriteLine("Max({0}, {1}) = {2}", x, y, MyUtility.Extremum(new MyUtility.Question(MyUtility.Max), x, y)); Console.WriteLine("Min({0}, {1}) = {2}", x, y, MyUtility.Extremum(new MyUtility.Question(MyUtility.Min), x, y)); }