
Zoob
Novice
Jun 29, 2009, 7:17 AM
Post #1 of 3
(246 views)
|
|
Need help (new perl user)
|
Can't Post
|
|
Basically i have been using Perl for about 5 days now at the company for my work experiance i have been doing well with some basic tasks that i needed to complete. But i have a problem with one of the tasks that was set. The question he gave me was 5. While loops and If conditions Using the while loop. Add some code to check if a number divides by 2. If it does then print "number divides by 2" So far i have thought that this code that i have started with may be required #while loops and if conditions # print " Enter a number to see if it is a multiple of 2\n"; $num = <STDIN>; my $var = $num Correct me if im wrong or state that i have started correctly. So my question is how can i solve this question
|