gbengaade47 gbengaade47
  • 28-09-2020
  • Computers and Technology
contestada

Design the logic for a program that allows a usher to continuously enter numbers until the usher enters 0. Display the sum of the numbers entered.

Respuesta :

TheMaster999
TheMaster999 TheMaster999
  • 28-09-2020

int sum = 0, n;

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

cout<<sum;

Answer Link

Otras preguntas

Find each x-value at which the tangent line to f\left(x\right)=x^3-6x^2-34x+40 f ( x ) = x 3 − 6 x 2 − 34 x + 40 has slope 2.
Someone plz help on # 5 I’m lost :(. (Ignore the writing)
What is probability? this is on my science test but I can't find it on my reference sheet please help...
(30 POINTS) Jamie rents a movie for a flat fee of $2.50 plus an additional $0.75 for each night she keeps the movie. Choose the cost function that represents th
Upon the death of the insured, the primary beneficiary discovers that the insured chose the interest only settlement option. What does this mean?
A client has had a total knee replacement and is receiving care that includes learning to walk with a walker. What level of prevention is most applicable to thi
Antibiotic resistance is a growing public health issue. How does an organism become resistant to a particular antibiotic
The basis of everything in life, including success, is __________. This concept lies at the heart of it all.
A spaceship is traveling at an average speed of 8 kilometers per seconds towards the moon. If the spaceship needs to travel 403,200 kilometers to reach the moon
a landscaping company delivers soul and bags to its customers they deliver 4,000 pounds of soil if each bag holds 16 pounds of store they how many bags were del