expntn :
000 to 999 --> a00 to z00 > aa0 to azo >za0 to zz0 >> aaa ,aaz aba,azz, baa,bba...bza to zzz ? any idea..help me pls!!!
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Kirtan PatelPosted Jun 11, 2010, 10:22 AM
static void Main(string[] args)
{
List<char> charlist = new List<char>();
charlist.Clear();
for(char i='0';i<='9';i++)
{
charlist.Add(i);
}
for (char x = 'A'; x <='Z'; x++)
{
charlist.Add(x);
}
StreamWriter sw = new StreamWriter("numbers.txt");
foreach (char c1 in charlist)
{
foreach (char c2 in charlist)
{
foreach (char c3 in charlist)
{
string FinalNumber = "";
FinalNumber = c1.ToString() + c2.ToString() + c3.ToString();
Console.WriteLine(FinalNumber);
sw.WriteLine(FinalNumber);
}
}
}
sw.Close();
Console.ReadKey();
}