rshoe has asked for the wisdom of the Perl Monks concerning the following question:
#!c:\Dwimperl\perl\bin\perl.exe use strict; use warnings; #### prompt a user to enter an integer print "Enter an integer "; my $integer = <STDIN>; chomp $integer; my $i = 199; ### use either a while loop or an until loop to count down from 199 to + 99 while($i >= 99){ ### display all multiples of the integer print $i - $integer . "\n"; --$i; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: count down with while loop
by McA (Priest) on Oct 23, 2014 at 16:07 UTC | |
by rshoe (Novice) on Oct 23, 2014 at 16:29 UTC | |
Re: count down with while loop
by johngg (Canon) on Oct 23, 2014 at 16:17 UTC | |
by rshoe (Novice) on Oct 23, 2014 at 16:47 UTC | |
Re: count down with while loop
by GotToBTru (Prior) on Oct 23, 2014 at 16:08 UTC | |
by rshoe (Novice) on Oct 23, 2014 at 16:39 UTC | |
Re: count down with while loop
by ww (Archbishop) on Oct 23, 2014 at 16:39 UTC |