static void GoodValue(int startValue, int endValue) { int sumGoodValue = 0; DateTime Time = DateTime.Now; for (int i = startValue; i < endValue; i++) { if (MyFunctions.CheckGoodValue(i)) { sumGoodValue++; } } TimeSpan workTime = DateTime.Now - Time; Console.WriteLine($"В диапазоне от {startValue} до {endValue} хороших чисел - {sumGoodValue} шт.\n" + $"Время работы рассчета(мин:сек:мсек) - {workTime:mm\\:ss\\:fff}"); }