good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: Solving math equationsby kelan (Deacon) |
on Nov 10, 2002 at 05:34 UTC ( [id://211731]=note: print w/replies, xml ) | Need Help?? |
Just a few pointers. You should be using != rather than ne in your while condition. ne is for string comparsion, and != is number comparison. Also, you don't need to increment both numbers. Just increment one, and divide into the total. If there's no remainder, you have one factor, which makes it easy to get the other one. On a side note, to everyone else who's reading, I can attest that this isn't homework. It's one of the Geek Challenges; the second one, actually. A couple of the higher ones are quite fun. kelan Perl6 Grammar Student
In Section
Seekers of Perl Wisdom
|
|