public static void RunPrimeFactors() { Console.Write("Enter a number: "); if (int.TryParse(Console.ReadLine(), out int n)) { PrimeFactors(n); } else { Console.WriteLine("You entered the wrong format"); } } // Driver Code