Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Manipulating data from a file

by RichardK (Priest)
on Dec 06, 2012 at 11:52 UTC ( #1007545=note: print w/ replies, xml ) Need Help??


in reply to Manipulating data from a file

I think it's easier to use maths to calculate the sum of the digits of an integer.

As this is your homework I'm not going to post the code but it's pretty simple using a while loop, the modulo operator % and int.


Comment on Re: Manipulating data from a file

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2014-09-17 05:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (58 votes), past polls