Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Control Statements #2

by vroom (His Eminence)
on Nov 24, 1999 at 01:26 UTC ( [id://1016]=note: print w/replies, xml ) Need Help??


in reply to Control Statement Exercises

# prints out all the numbers from 1 to 100, along with any # numbers they're evenly divisible by for ( my $i = 1; $i <= 100; $i++ ) { print "$i: "; for ( my $j = 1; $j <= $i; $j++ ) { if ( $i % $j == 0 ) { print "$j "; } } print "\n"; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1016]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2024-04-19 09:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found