zdravim, píšu si z nudy program na lámáno hesel, tady kód
static void Main(string[] args)
{
string[] poe = {"0","1","2","3","4","5","6","7","8","9","a","á","b","c","č","d","ď","e","é","f","g","h","i","í","j","k","l","m","n", "ň","o","ó","p","q","r","ř","s","š","t","ť","u","ú","ů","v","w","x","y","z","ž"};
string[] poe2 = new string[10];
Console.Read();
for (int c1 = 0; c1 < poe.Length; c1++)
{
poe2[0]=poe[c1];
for (int c2 = 0; c2 < poe.Length; c2++)
{
poe2[1] = poe2[0] + poe[c2];
for (int c3 = 0; c3 < poe.Length; c3++)
{
poe2[2] = poe2[1] + poe[c3];
for (int c7 = 0; c7 < poe.Length; c7++)
{
poe2[3] = poe2[2] + poe[c7];
for (int c4 = 0; c4 < poe.Length; c4++)
{
poe2[4] = poe2[3] + poe[c4];
for (int c5 = 0; c5 < poe.Length; c5++)
{
poe2[5] = poe2[4] + poe[c5];
for (int c6 = 0; c6 < poe.Length; c6++)
{
Console.WriteLine(poe2[5] + poe[c6]);
if (hash(Convert.ToString(poe2[5] + poe[c6])).ToString() == "C965AE220DD94256823ABF7AA4ECA000")
{
MessageBox.Show("Tadá");
}
}
}
}
}
}
}
}
}
stylistiku neřešte, Problém tkví v tom, že já potřebuju aby se mi podle vstupu z Console.Write();, kdy se zadává délka hesla, aby se podle toho čísla co se zadá, určil i ten počer forcyklů. Nechce se mi pro každou délku až do 14 delat speciál metoda. Nevíte jak by to mohlo jít?