Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

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

by Anonymous Monk
on Jan 30, 2013 at 08:59 UTC ( #1016001=note: print w/replies, xml ) Need Help??


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

The formula you need is:- 1/2n (n+1) N is the number. Eg (all numbers from one to ten), ten is number. So 1/2 * 10 =5 * (10+1) =55 Comes from sigma notation.....and i never got any gcses :)
  • Comment on Re^2: Finding sum of all digits from 1 to 1 million.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016001]
help
Chatterbox?
[erix]: PostgreSQL 10 rc 1 is released

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (14)
As of 2017-09-21 13:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (248 votes). Check out past polls.

    Notices?