Ask a New Question

Question

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.
4 years ago

Answers

oobleck
sum=0
for (i=1..10) {sum += i/(11-i)}
4 years ago

Related Questions

Write a loop that will continuously prompt the user for integers to sum, -1 to exit. Sum these value... write a program that calculates a customer's monthly bill. it should input customer name, which pack... Write a program that calculates and displays the total travel expenses of a businessperson on a tri... write a program that calculates the gross pay and net pay of a weeklly paid employee Write a program that calculates and displays the amount of money you would have if you invested $1,0... Write a program using for loop along with switch case Write a loop to print all elements in hourly_temperature. Separate elements with a -> surrounded by... Write a loop that prints each country's population in country_pop. Sample output with input: 'Ch... Write a loop that reads positive integers from standard input, printing out those values that are gr... Write a program that calculates and displays the total cost of a meal after applying a 15% tip. -...
Ask a New Question
Archives Contact Us Privacy Policy Terms of Use