sum=0
for (i=1..10) {sum += i/(11-i)}
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.
1 answer