I'm new to c# language and still learning. I have to write a console application (like example) but the real problem for me is that I don't know how to access each number for the input integer and pass it on the division function (n % 2 ==0) and return even/odd for the given number.
For example: the user input: 4444 and the console result: even even even even
string inputData = Console.ReadLine(); // the 4 digit number
int number = Convert.ToInt32(inputData);
string emptyStr = String.Empty;
string divided = "even";
string notDivided = "odd";
// here .......????
if (number % 2 == 0)
{
Console.WriteLine(divided);
}
else
{
Console.WriteLine(notDivided);
}