Answers for "c# prime factorization"

C#
1

c# prime factorization

class Program
{
    static void Main(string[] args)
    {
        int a, b;
        Console.WriteLine("Please enter your integer: ");
        a = int.Parse(Console.ReadLine());
        for (b = 1; b <= a; b++)
        {
            if (a % b == 0)
            {
                Console.WriteLine(b + " is a factor of " + a);
            }
        }
    }
}
Posted by: Guest on March-23-2020

Code answers related to "c# prime factorization"

C# Answers by Framework

Browse Popular Code Answers by Language