Chris Parker am Donnerstag, 30. November 2006 14:57:
> Adriano Ferreira wrote:
> >> STDIN and then make a loop for them. So you should remove the
> >> construction of @numbers from the loop, doing
> >
> > Code now is:
>
> print("Enter widths separated by spaces: \n");
> my @numbers = split /\s+/, <
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Adriano Ferreira wrote:
>
>> STDIN and then make a loop for them. So you should remove the
>> construction of @numbers from the loop, doing
>
>
>
> Code now is:
>
print("Enter widths separated by spaces: \n");
my @numbers = split /\s+/, <>;
for my
On 11/30/06, Chris Parker <[EMAIL PROTECTED]> wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Adriano Ferreira wrote:
> On 11/30/06, Chris Parker <[EMAIL PROTECTED]> wrote:
>> while(@numbers = <>) {
>>
>> # Extract widths @width = split(" ", $numbers);
>
> Here at this piece of code, @numbe
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Adriano Ferreira wrote:
> On 11/30/06, Chris Parker <[EMAIL PROTECTED]> wrote:
>> while(@numbers = <>) {
>>
>> # Extract widths @width = split(" ", $numbers);
>
> Here at this piece of code, @numbers and $numbers are different
> variables. And you nev
On 11/30/06, Chris Parker <[EMAIL PROTECTED]> wrote:
while(@numbers = <>)
{
# Extract widths
@width = split(" ", $numbers);
Here at this piece of code, @numbers and $numbers are different
variables. And you never assign anything to $numbers. Probably you
want this:
while (
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I am trying to get this to take random amount of widths and compute
the square footage for each. For example:
Enter Total Square Footage: 1234
Enter widths seperated by spaces
3 4 5
size 3: amount needed = 0
size 4: amount needed =
size 5: amount n