Re: target practice -- lottery numbers

2004-02-27 Thread Wiggins d'Anconia
R. Joseph Newton wrote: Cy Kurtz wrote: Hi all. I have a little program here that generates a lottery play slip for the mega-millions game. It selects 50 of the 52 numbers exactly once over 10 tickets of 5 numbers each. It then selects 10 super ball numbers, one for each ticket. It then prints it

RE: target practice -- lottery numbers

2004-02-27 Thread David le Blanc
> > > $k=1; > > while($k<(($i-1)*5+$j)){ > > Pop quiz time. What's easier to read, the above or this: > > while( $k < ( ( $i - 1 ) * 5 + $j ) ) { > > We won't bill you for the whitespace. ;) > That is of course assuming that *indiscriminate* padding with spaces incre

Re: target practice -- lottery numbers

2004-02-27 Thread R. Joseph Newton
Cy Kurtz wrote: > Hi all. I have a little program here that generates a lottery play slip > for the mega-millions game. It selects 50 of the 52 numbers exactly once > over 10 tickets of 5 numbers each. It then selects 10 super ball > numbers, one for each ticket. It then prints it all out(duh). >

RE: target practice -- lottery numbers

2004-02-27 Thread Charles K. Clarkson
Here's my entry. I took a different approach than James. I don't like to collect the data and produce the report at the same time. Both our approaches are valid, though. I tried to stick with James' report structure. Perl allows us to be selective with our styles. I find it a comfortable

Re: target practice -- lottery numbers

2004-02-27 Thread James Edward Gray II
(Let's keep our discussion on the list, so we can all help and learn.) On Feb 27, 2004, at 9:28 AM, Cy Kurtz wrote: Here is my updated code, in case you're interested. It's not as elegant as your code(I can see I have a lot to learn!), but it works for me. I'm still studying your code. Thank you

target practice -- lottery numbers

2004-02-26 Thread Cy Kurtz
Hi all. I have a little program here that generates a lottery play slip for the mega-millions game. It selects 50 of the 52 numbers exactly once over 10 tickets of 5 numbers each. It then selects 10 super ball numbers, one for each ticket. It then prints it all out(duh). I wonder if anyone would l

Re: target practice -- lottery numbers

2004-02-26 Thread James Edward Gray II
On Feb 26, 2004, at 3:54 PM, Cy Kurtz wrote: Hi all. Hello. [snip problem description] The code(try not to laugh out loud): I'll inline some comments. #!/usr/bin/perl #numpick.pl #use strict; This is easily fixed, see below. #use warnings; This problem takes a little more work to fix, but I'll

Re: target practice -- lottery numbers

2004-02-26 Thread Owen
On 26 Feb 2004 16:54:12 -0500 Cy Kurtz <[EMAIL PROTECTED]> wrote: > Hi all. I have a little program here that generates a lottery play slip > for the mega-millions game. It selects 50 of the 52 numbers exactly once > over 10 tickets of 5 numbers each. It then selects 10 super ball > numbers, one f