78.4k views
0 votes
-

-
-
-
+
d. Following is the development of a formula for the sum of n consecutive integers.
S = x + (x + 1) + (x + 2) + ... + y-2) + (y - 1) + y The sum of n integers from x to y
S = y + (y - 1) + (y - 2) + ... + (x + 2) + (x + 1) + x The same sum in reverse order
28 = (x + y) + (x + y) + (x + y) + ... + (x + y) + (x + y) + (x + y) Add the equations.
28 = n(x + y)
There are n terms of (x + y).
n(x + y)
S. "
Divide each side by 2.
Use the formula to find the sum of the numbers 101-110.
e. What kind of reasoning did you use in part (d)?

User ItsJason
by
4.3k points

1 Answer

5 votes

Answer:

Step-by-step explanation: Given a number N. Given two numbers X and Y, the task is to find the sum of all those numbers from 1 to N that are divisible by X or by ... Sn = (n/2) * {2*a + (n-1)* d} ... + (N / (X * Y) - 1) * (X * Y))/ 2;. return S1 + S2 - S3;. } // Driver code. int main().

hope this is right

User ISWORD
by
4.3k points