Esempio n. 1
0
 public void Init()
 {
     printDig = new PrintDigits();
     result = printDig.GetDigits(start, end, strDiv3, strDiv5);
 }
Esempio n. 2
0
        /// <summary>
        /// Print the results of the FizzBuzz method to the console.
        /// </summary>
        /// <param name="input1">integer input 1</param>
        /// <param name="input2">integer input 2</param>
        /// <param name="input3">string input 3 ("Fizz")</param>
        /// <param name="input4">string input 4 ("Buzz")</param>
        private static void PrintFizzBuzzResults(int input1, int input2, string input3 = "Fizz", string input4 = "Buzz")
        {
            PrintDigits pd = new PrintDigits();
            List<string> outList = pd.GetDigits(input1, input2, input3, input4);

            foreach (var s in outList)
            {
                Console.WriteLine(s);
            }
        }