예제 #1
0
        static void Main(string[] args)
        {
            PrimeNumber prime_number = new PrimeNumber();

            Console.WriteLine("请输入一个数字");

            string a_num = Console.ReadLine();

            prime_number.num = Convert.ToInt32(a_num);

            int[] final_numbers = prime_number.Divide(prime_number.num);

            Console.WriteLine($"{prime_number.num}的素数因子分别为:");

            foreach (int num in final_numbers)
            {
                if (num != 0)
                {
                    Console.WriteLine(num);
                }
            }
        }