1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
IrinaK [193]
3 years ago
11

Given that two int variables, total and amount, have been declared, write a loop that reads integers into amount and adds all th

e non-negative values into total. The loop terminates when a value less than 0 is read into amount. Don't forget to initialize total to 0.
Computers and Technology
1 answer:
Whitepunk [10]3 years ago
8 0

Answer:

Following are the statement in C++ Language is given below

total=0; // variable declaration

cin >> amount; // Read the input

while(amount >=0) //iterating the loop

{

if(amount>0) // checking condition

total=total+amount; // perform operation

}

Explanation:

Following is the description of the statement

  • Declared a variable "total" and initialized with them 0 to them.
  • Read the input in the "amount" variable by using cin.
  • iterating the loop when the amount is greater then 0.
  • Checking the condition if(amount>0) then adding the total variable and amount and storing them into the total variable.

You might be interested in
Orphaned data is also created by the way that the hard drive allocates space on the hard drive for information that the user wan
Anika [276]
It think the answer to that question maybe true
8 0
3 years ago
PLEASE HELP ME
alexira [117]

Answer:

it won't be able to run

Explanation:

because computer runs on physical memory

5 0
3 years ago
Gwen has a photo she'd like to display in her speech, but she forgot to digitize it. She only has a hard copy, and she doesn't h
irina1246 [14]

Answer:

Option(d) i.e "document camera " is the correct answer for the given question  

Explanation:

The document camera is mainly preferable when our aim displays the object into a large audience with the help of document camera  Gwen displays her speech into the classroom.

The hard copy is simply placed in the document camera, it takes the hard copy as an image format and gives the live image of the speech with the help of a monitor .

  • The main advantage of a document camera is that they provide greater flexibility.
  • Traditional whiteboard, overhead projector, flip charts not the best solution for that problem also they do not provide flexibility so they are all incorrect options.

8 0
4 years ago
What can be done to reduce the occurrence of policy
natali 33 [55]
What can be done to reduce the occurence of policy?


5 0
4 years ago
Example: An amount of $1,500.00 is deposited in a bank paying an annual interest rate of 4.3%, compounded quarterly. What is the
maw [93]

Answer:

the answer is

Explanation:

3 0
4 years ago
Other questions:
  • Why is it important to have regular maintenance and care of your office equipment?
    5·1 answer
  • A cpu with an external clock speed of 2 ghz and a 64-bit data bus can (theoretically) transfer how much data per second?
    8·1 answer
  • A user reports that he can't connect to a specific website. you go to the user's computer and reproduce the problem. what should
    11·1 answer
  • Forms are used to a provide a more user-friendly way to work with data in tables
    14·1 answer
  • What is one potential problem with the following loop? System.out.print("Enter integers. Enter -1 to exit."); System.out.println
    12·1 answer
  • 2. 5s is a Chinese principle adapted for use in the workplace.<br>True or False​
    11·1 answer
  • Que medios se utilizan para respaldar información?
    8·1 answer
  • Which of the following is NOT a factor of identifying graphic design?
    10·2 answers
  • PLZ HELP I DIDNT MEAN TO CLICK THAT ANSWR I NEEDD HELP
    15·1 answer
  • Where would you click to change the<br><br>Screen Saver?​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!