D
D
DevilPrado2019-10-23 00:01:57
Mathematics
DevilPrado, 2019-10-23 00:01:57

How to calculate an infinite sum?

5daf6dc9901cf535838804.jpeg
The crux of the matter is that I don't quite understand how exactly to calculate it. How can an infinite sum be calculated in general (more precisely, I understand that it can be calculated using the mathematical apparatus, but how should it look in the code?), any language will do
5 task

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Grigory Boev, 2019-10-23
@ProgrammerForever

1) sum=0; n=0;
2) calculate S(n)
3) if S(n)>ε then 4) otherwise exit
4) sum+=S(n); n++;
5)Go to 2)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question