Hey nerds, or would you guys prefer geeks?
I'm a programmer in training and have come up with a little idea which requires some math that I can't work out.
Basically, I have an array:
If you guys understand that much.. I don't know what the math terminology is for this kind of rubbish.Code:A = Array ( 0 => 'a', 1 => 'b', 2 => 'c' )
this is basically what it is..
A0 = a
A1 = b
A2 = c
Then here's what I'm trying to do.
I'm planning on looping through every letter in the array, then once I've ran out of letters I start with the first letter and make a double letter string. For example:
Just like couting..Code:a b c aa ab ac ba bb bc ca cb cc aaa aab aac aba abb abc aca acb acc baa bab bac bba bbb bbc bca bcb bcc caa cab cac cba cbb cbc cca ccb ccc.. etc
K.. well what would be the way of doing this. I'm guessing some sort of power to.Code:0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20... etc
Thanks for any help.


LinkBack URL
About LinkBacks
