Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Use a loop to write all numbers between 1 and 10
, but, is there a way of doing it with a while loop?for ($j=1; $j<=10; $j++) { print "$j\n"; }
Calculate the factorial for a user-defined number.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: SIMPLE way to write these?
by choroba (Cardinal) on Feb 04, 2014 at 14:09 UTC | |
by Anonymous Monk on Feb 04, 2014 at 14:13 UTC | |
by choroba (Cardinal) on Feb 04, 2014 at 14:24 UTC | |
by Anonymous Monk on Feb 04, 2014 at 14:36 UTC | |
by GotToBTru (Prior) on Feb 04, 2014 at 15:04 UTC | |
| |
|
Re: SIMPLE way to write these?
by tobyink (Canon) on Feb 04, 2014 at 15:20 UTC | |
|
Re: SIMPLE way to write these?
by johngg (Canon) on Feb 04, 2014 at 16:03 UTC | |
|
Re: SIMPLE way to write these?
by karlgoethebier (Abbot) on Feb 04, 2014 at 14:39 UTC | |
|
Re: SIMPLE way to write these?
by 2teez (Vicar) on Feb 04, 2014 at 14:27 UTC | |
|
Re: SIMPLE way to write these?
by pvaldes (Chaplain) on Feb 04, 2014 at 15:18 UTC |