Computer Science, asked by anamika4827, 10 months ago

Write a program to generate the sequence: –5, 10, –15, 20, –25..... upto n, where n is an integer input by the user.

Answers

Answered by Anonymous
7

Answer:

Explanation:

This is an

Arithmetic sequence

The standard sequence being :

a , a+d , a+2d , a+3d , ............... , a+(n-1)d

where a , is the 1st term and d , the common difference.

The sum to n terms of the sequence is :

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯

a

a

S

n

=

n

2

[

2

a

+

(

n

1

)

d

]

a

a

−−−−−−−−−−−−−−−−−−−−−−−−−

here a = 5 , d = 10-5 = 15-10 = 5 and n = 10

S

10

=

10

2

[

2

×

5

+

9

×

5

]

=

5

×

55

=

275

Plz Plz Plz Mark me as BRAINLIEST

Answered by vhemanth9563
4

Answer:

please mark the brainlist i will give you answer and final free 80 points ok

Similar questions