subject

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.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 14:30
Two students are discussing the flow of electricity. student a says that voltage is a measure of the amount of electron flow in a circuit. student b says that power is the product of voltage and current. which of the following statements is correct? a. only student a is correct b. only student b is correct c. both of the two students are correct d. neither of the two students is correct
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Which of the following processes applications across multiple computing devices? a. functional application b. distributed system c. workgroup information silo d. information silo
Answers: 3
question
Computers and Technology, 25.06.2019 07:00
Quick styles allow you to format an entire document quickly? t/f
Answers: 1
question
Computers and Technology, 25.06.2019 12:00
If you fear you have been abusive to a partner, what can you do?
Answers: 2
You know the right answer?
A) Write a program that prompts for an integer—let’s call it X—and then finds the sum of X consecuti...
Questions
question
Mathematics, 08.10.2019 08:00
question
Mathematics, 08.10.2019 08:00
question
Mathematics, 08.10.2019 08:00
question
History, 08.10.2019 08:00