Asked by Daniel

Write a loop that calculates the (float) sum of the following series of numbers: 1/10 + 2/9 + 3/8 + … + 10/1. The numbers should not be precalculated,
rather the loop should cause the increment/decrement.

Answers

Answered by oobleck
sum=0
for (i=1..10) {sum += i/(11-i)}
There are no AI answers yet. The ability to request AI answers is coming soon!

Related Questions