Exemplo n.º 1
0
        public void Decimal_Palprimes()
        {
            //Arrange
            var findPalprimes = new PalprimeFinder(_binaryNumberBL, _decimalNumberBL);

            //Act
            var ressult = findPalprimes.FindPalprimes(Convert.ToInt32(NumberSystem.Decimal));

            //Asert
            Assert.AreEqual(ressult.Count, 20);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            var palprimesFinder = new PalprimeFinder();

            do
            {
                try
                {
                    int numBase = Menu();
                    foreach (var item in palprimesFinder.FindPalprimes(1000, numBase))
                    {
                        Console.WriteLine($" ->{item}");
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
            } while (true);
        }