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

A compromise can only be reached when​
HURRY PLEASE!!!!!!!!!!!!!!!!!!!
____________(cutaneous papilloma) is a benign growth that hangs from a short stalk, commonly occurring on the neck, eyelids, axilla, or groin of an older person
I WILL AWARD BRAINLIEST IF YOU ANSWER ALL OF THESE!! THANK YOU!! Find the number if: 5% of it is 23% of 15.5 4% of it is 31% of 16.4 4.5% of it is 23% of 45 5.5
A thin oil slick (no=1.50) floats on water (nw=1.33). When a beam of white light strikes this film at normal incidence from air, the only enhanced reflected col
Let’s say you’re evaluating a customer of your organization as a potential brand advocate. In addition to the three R’s, what’s another criteria you could use t
What’s the answer please help. Please provide an explanation. Thanks a lot! Find the percentage of the package that empty
Listed below are student evaluation ratings of​ courses, where a rating of 5 is for​ "excellent." The ratings were obtained at one university in a state. Constr
Factor 9y2 - 12y + 4. (3 y - 2)(3 y + 2) (3 y - 4)( y + 1) (3 y - 2) 2
From a Group of 8 People, Including George and Nina, 3 people are to be selected at random to work on a certain project. What is the probability that 3 people s