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 the domain and range of the relation and determine whether it is a function. A. domain: positive integers; range: positive integers; No, it is not a funct
Ser and Estar both mean "to be"= "I am, you are, she is" etc.) true or false
Why might a simple word work better than a “fancy” word in your ICE paragraph
On January 1, Company A leased equipment for a six-year period. Annual lease payments are $12,000 due on December 31 of each year. The payments are calculated b
In which physical region of Europe is Italy located?
Rosa is selling hotdogs, h, for $4 at a fair. She spent $200 on supplies for the sale. Which equation models the profit, P, that Rosa makes based on her hotdog
A production department's output for the most recent month consisted of 15,000 units completed and transferred to the next stage of production and 15,000 units
(1.7 x 10-5 m) x (3.72 x 10-4 m) *
Which of the following citizens are required to sign up for selective services? A males 18-25 В. males and females 18-25 Cmales 25 and older D males and females
She planned to observe the flowers for the next five days for an hour at the same time each afternoon. Then she would plot the data in a multiple line graph to