Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }