public void MultipierTest() { Multipier calculator = new Multipier(); double result = calculator.Calculate(6, 5); Assert.AreEqual(30, result); }
static int DoNTimes(int i, int n, Multipier f) { int value = i; for (int x = 0; x < n; x++) { value = f(value); } return value; }
static int DoFiveTimes(int i, Multipier f) { return f(f(f(f(f (i))))); }