Id like to implement this into my game please help.

Its in c#. Its a challenge my friend told me to put into my game at random. Though im not good at solving this. Ive tried multiple times. Can someone please figure this out so I can upload it into my game?

The main body of code has to use this ive figured out so far.
while (true)
{
string linestring = Reader.ReadLine();
if (linestring == null)
{
break;
}
int Number = Convert.ToInt32(linestring);
int EvenSum = 0;
int OddSum = 0;
int n = Number;
for (int i = 1 ; i <= n ; i++)
{
if (n % i == 0) //is it a divisor?
{
if (i % 2 == 0) //is it even?
{
EvenSum += i;
}
else //is it off
{
OddSum += i;
}
}
}

Here is the zip with the rest. All help is thanked.[109892-even-odd-sums-1.zip|109892]

So, what was it you were trying to do?