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.
+5
Answers (1)
Know the Answer?
Not Sure About the Answer?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Home » Computers & 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.