Do the exercise on a sheet of paper:
1) write down how you would do it "manually"
2) write your instructions for "manual" execution of the task in some controll flow form, e.g.
general idea: take the digits from the right to left and store their word equivalent in a string.
1) if the number is zero, the result is "zero"
2) otherwise
2.1) initialize the result string to empty string
2.2) take the reminder of the division of the number by 10
2.3) convert that reminder to the word equivalent and prefix the result string by that new word
2.4) take the division by 10 of the number as new number value
2.5) repeat 2.1)...2.5) until the new number value is zero
2.6) the result is the result string
... or alike.
Play it through on paper to check if the description above (called "pseudo-code") behaves as required.
Now you understand the problem well enough.
Next step is to translate that into C#.
string ToWordEquivalent(int number)
{
if (number == 0) return "0";
if (number < 0) return "minus " + ToWordEquivalent(-number);
string[] words = new string[] { "zero", "one", ... };
string result = string.Empty;
while(number > 0)
{
result = ...[number % 10] + " " + result;
number = ... / ...;
}
return result.Trim();
}
Fill in the missing parts, call the function in some test cases.
Cheers
Andi
PS: That's almost too much helped... ;-)