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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 13:00, TJxx187
Should i buy a samsung s10 or google pixel 3xl
Answers: 1
image
Computers and Technology, 22.06.2019 15:20, brookemcelhaney
The north and south regions had very diferent economies in the 1800s.
Answers: 1
image
Computers and Technology, 24.06.2019 01:00, arturocarmena10
The initial tableau of a linear programming problem is given. use the simplex method to solve it. x 1 x 2 x 3 s 1 s 2 z 1 2 4 1 0 0 8 3 4 1 0 1 0 10 minus3 minus12 1 0 0 1 0 the maximum is nothing when x 1equals nothing, x 2equals nothing, x 3equals nothing, s 1equals3, and s 2equals0. (be sure to simplify to lowest terms if necessary.)
Answers: 2
image
Computers and Technology, 24.06.2019 11:00, maddiiie128
Why is it uncommon for users to perform searches directly in database tables? a.)users are discouraged from interacting directly with tables because they might confuse tables with spreadsheets. b.) users are discouraged from interacting directly with tables because this may result in unintended changes to source data. c.)users do not have the technical skills required to perform searches directly in database tables. d.)users do not have the permissions required to perform searches directly in database tables.
Answers: 1
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 in other subjects:

Konu
Social Studies, 17.09.2019 11:30