Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re: Finding sum of all digits from 1 to 1 million.

by pvaldes (Chaplain)
on Jan 30, 2013 at 18:55 UTC ( #1016136=note: print w/replies, xml ) Need Help??

in reply to Finding sum of all digits from 1 to 1 million.

find the sum of all decimal digits appearing in the natural numbers from one to one million inclusive

mhhh, I don't get it ... the answer is?:

print "0";

integers don't have decimals

Updated: Forget this, I was not understanding the question, obviously...

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2016-09-25 03:22 GMT
Find Nodes?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:

    Results (463 votes). Check out past polls.