Hello
i am having troubel with the following code and would like it to return a number's factors but i am having multiplee weird errors
using System; namespace Algorythm_test { class Program { public static void Main(string[] args) { System.Console.WriteLine("Emersont1's Factor finder\n Please Enter your Number to check factors"); int Lim = Convert.ToInt32(Console.Read()); System.Console.WriteLine("The Number " + Lim + " has " + Factors(Lim) + " factors"); } public int Factors(int value) { int Secondnum = 1; While Secondnum <=value; { if (value % Secondnum == 0) { Factors++; } Secondnum++; } return Factors; } } }
Thank you for any support
Emersont1