static void Main(string[] args) { Integrator integrator = new Integrator(); double result = integrator.Integrate(new SimpleFunction(), 1000000, 10000); Console.WriteLine(result); result = integrator.Integrate(new ComplexFunction(), 1000000, 10000); Console.WriteLine(result); }