# Sum of the digitsWatch

Announcements
This discussion is closed.
17 years ago
#1
Hi

I would like to sum the digits which make up a number.

The number is in the range from 10..99.

What formula can be applied?

Thank you.
0
17 years ago
#2
The sum of a sequence is found by n/2[a+l] or n/2[2a+(n-1)d] where n is the amount of terms i.e 90,
a is the first term i.e 10, d is the difference i.e 1, and l is the last term i.e 99. You should get
4905. Hope this helps.
0
17 years ago
#3
night <[email protected]> wrote in uk.education.maths:

[q1]>I would like to sum the digits which make up a number.[/q1]
[q1]>[/q1]
[q1]>The number is in the range from 10..99.[/q1]
[q1]>[/q1]
[q1]>What formula can be applied?[/q1]

(first digit) + (second digit), of course.

If you mean a computer formula, then you need to find the function or command that says "throw away
the fractional part". In some languages that is INT( ). And you need the function or command that
says "take just the remainder and ignore the quotient"; in many languages that is MOD( ).

On those assumptions, the first digit is INT(N/10) and the second is MOD(N,10), so your sum is
INT(N/10) + MOD(N,10).

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA http://oakroadsystems.com "Boy Critical
After Rescue From River" -- headline in the /Cortland Standard/ 16 April 2002 Gosh, there's just no
pleasing some people.
0
X
new posts

### 1,763

people online now

### 225,530

students helped last year
Latest
My Feed

### Oops, nobody has postedin the last few hours.

Why not re-start the conversation?

see more

### See more of what you like onThe Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

### Poll

Join the discussion

At least 5 GCSEs at grade 4 (65)
14.16%
At least 5 GCSEs at grade 5 (70)
15.25%
At least 5 GCSEs at grade 6 (90)
19.61%
Higher than 5 GCSEs at grade 6 (185)
40.31%
Pass in English and Maths GCSE (21)
4.58%
6.1%