D
dorayme
richard said:So catch the wave and join the fun.
I swim rather than surf. Better exercise and not so dangerous.
richard said:So catch the wave and join the fun.
On Sat, 04 Apr 2009 04:32:36 -0500
Hi,
I'am trying to make an HTML programm of all possible combinations in the
Alphabet.
Actually I have that on my CV in the "skills" section.
The code exists of 3 letters.
26*26*26 = 17.576 possibilities!
Is there any possibility to have all combinations with a
programm? AAA, AAB, AAC, …
Many thanks in advance if somebody could help me out.
Here is a Python program to do it:
from string import uppercase as u
for i in range(26):
for j in range(26):
for k in range(26):
print '<span class="code">%s</span>' % (u + u[j] + u[k])
[snip]
PHP version may look something like:
<ol>
<?php
$range = range('A', 'Z');
foreach($range as $A)
foreach($range as $B)
foreach($range as $C)
print "<li>$A$B$C</li>\n";
?>
</ol>
Hell, in run basic I can come up with 3 or 4 ways to do it.
html "<ul>"
For a =64 to 90
for b=64 to 90
for c=64 to 90
show$=chr$(a)+chr$(b)+chr$(c)
html "<li>";show$;"</li>"
next c
next b
next a
html "</ul>"
Hardly.
I suggested PHP in this case because all that you need to do for the
output PHP can handle just as well.
Javascript is also a possibility
(e-mail address removed) (Raymond Schmit) wrote in
I already posted a javascript implementation earlier.
http://pages.videotron.com/duffym/test.htm
That's why I like the simplicity of BASIC.
That's why I like the simplicity of BASIC.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.