stephenpowellrules stephenpowellrules
  • 08-02-2022
  • Computers and Technology
contestada

design the logic for a program that allows a user to enter a number. display the sum of every number from 1 through the entered number

Respuesta :

jmann9574
jmann9574 jmann9574
  • 08-02-2022

Answer: int sum = 1, n;

do {cin>>n; sum+=n;}while (n!=0);

cout<<sum;

Explanation:

Answer Link

Otras preguntas

The first forms of life on Earth were ________. plants microorganisms birds dinosaurs
what is a informal language used by members of a social group​
Can u help me with 10 examples of drug-drug pharmacodynamic interactions? please
Which of the following statements is correct? A) The measure of a soil's capacity to hold water and air is called permeability. B) Distinctly alkaline diagnost
4. To view data in reports by user categories such as Bronze, Gold, and Platinum status levels, what Google Analytics feature is needed to collect this data?
which phrase BEST describes a scientific theory A. a statement of pure fact B. a collection of data C. a general based on an observable fact D. an EdUcAtEd gues
Sarah stans LOONA. If she stanned LOONA two years ago and was 16 years old, how old is she during Hi High?
At metaphase I, homologous chromosomes are connected only at what structures? chiasmata recombination nodules microtubules kinetochores
1. Me quiero comprar (these) zapatos porque me gustan mucho. 2. Comimos en (that) centro comercial la semana pasada. 3. (that over there) tienda vende las gaf
Which type of animal maintains a constant internal body temperature? endotherm ectotherm coelomate mesoderm