a) Write a program that prompts for an integer-let's call it X-and then finds the sum of X consecutive integers starting at 1. That is, if X=5, you will find the sum of 1+2+3+4+5=15. b) Modify your program by enclosing your loop in another loop so that you can find consecutive sums. For example, if 5 is entered, you will find five sum of consecutive numbers:1 = 11+2 = 31+2+3 = 61+2+3+4 = 101+2+3+4+5 = 15Print only each sum, not the arithmetic expression.
+4
Answers (1)
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “a) Write a program that prompts for an integer-let's call it X-and then finds the sum of X consecutive integers starting at 1. That is, if ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Home » Computers and Technology » a) Write a program that prompts for an integer-let's call it X-and then finds the sum of X consecutive integers starting at 1. That is, if X=5, you will find the sum of 1+2+3+4+5=15.