M
moondaddy
Using c# 3.0:
I need to do a loop and for each iteration I need to call the next letter of
the alphabet. Sometimes this code may only loop 10 times, and other cases
it may loop 100 times.
I need to do something line this:
for (int i = 1; i <= X; i++)
{
Console.WriteLine(nextLetter);
}
And the result would be like this:
a
b
c
d
e
etc.
After the 26th loop the results would be like this:
aa
ab
ac
ad
ae
etc.
any ideas how I might achieve this?
Thanks.
I need to do a loop and for each iteration I need to call the next letter of
the alphabet. Sometimes this code may only loop 10 times, and other cases
it may loop 100 times.
I need to do something line this:
for (int i = 1; i <= X; i++)
{
Console.WriteLine(nextLetter);
}
And the result would be like this:
a
b
c
d
e
etc.
After the 26th loop the results would be like this:
aa
ab
ac
ad
ae
etc.
any ideas how I might achieve this?
Thanks.