I want to create a program in C# 2005 which calculates prime factors of a given input. i want to use the basic and simplest things, no need to create a method for it nor arr
public static List Generate(int number)
{
var primes = new List();
for (int div = 2; div <= number; div++)
while (number % div == 0)
{
primes.Add(div);
number = number / div;
}
return primes;
}
If you want to learn steps of development you can watch video here.