Vulnerability Development mailing list archives
Re: combinations of 4
From: nonme <stf () xtra co nz>
Date: Mon, 08 Apr 2002 17:34:12 +1200
At 01:43 p.m. 7/04/02 -0700, jon schatz wrote:
On Sat, 2002-04-06 at 17:01, KF wrote:My question is does anyone know how to programatically do this? Do i need to make use of bit shifting or something? I need only a program to print the list to the screen or something simple. Example output would be ... AAAA BBBBB .... AAAB AAACperl -e 'foreach (AAAA..ZZZZ) { print $_,"\n";}' i'm sure someone on this list can golf this down, but this should be sufficient...
Well Jon, I think you win the prize ;-) I can't even come close to that in C and i'm sure someone can out do my feeble attempt. int main() { int a,b,c,d; for ( a=65; a < 91; a++) { for ( b=65; b < 91; b++) { for ( c=65; c < 91; c++) { for ( d=65; d < 91; d++) { printf("%c%c%c%c\n",a,b,c,d); } } } } } Have fun, Harm none. - nonme
Current thread:
- combinations of 4 KF (Apr 07)
- Re: combinations of 4 Philip Rowlands (Apr 07)
- Re: combinations of 4 Sebastian Jaenicke (Apr 07)
- Re: combinations of 4 martin f krafft (Apr 07)
- Re: combinations of 4 Rui Miguel Silva Seabra (Apr 07)
- Re: combinations of 4 jon schatz (Apr 07)
- Re: combinations of 4 KF (Apr 07)
- Re: combinations of 4 nonme (Apr 08)
- Re: combinations of 4 bugtraq42 (Apr 08)
- Re: combinations of 4 Valdis . Kletnieks (Apr 08)
- Re: combinations of 4 Michael Greenberg (Apr 08)
- Re: combinations of 4 Valdis . Kletnieks (Apr 08)
- Re: combinations of 4 Michael Greenberg (Apr 08)
- <Possible follow-ups>
- RE: combinations of 4 Kayne Ian (Softlab) (Apr 08)
- re: combinations of 4 KF (Apr 08)