Esempio n. 1
0
        public void PlayFactorizer()
        {
            ConsoleOutput.DisplayTitle();

            while (true)
            {
                int number;
                number = ConsoleInput.GetIntFromUser();
                ConsoleOutput.DisplayFactors(number);
                ConsoleOutput.DisplayPrimeNumber(number);
                ConsoleOutput.DisplayPerfectNumber(number);

                bool isPlaying = ConsoleInput.PlayAgain();

                if (!isPlaying)
                {
                    break;
                }
            }

            ConsoleOutput.DisplayEndTitle();
        }