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
There are several vehicles in a parking lot. Some of them are motorcycles
GREYUIT [131]

Answer:

The answer is 34.

Explanation:

Look at the pic.

4 0
3 years ago
Read 2 more answers
Give two reasons you should be aware of your computer's system components and their characteristics.
Degger [83]

Answer:

You should be aware of the components because of the security and the performance of your computer, if your hardware is damaged, your software may be too, and your computer may be in risk, and anyone likes computers with bad performance

brainliest please :)

6 0
3 years ago
How do I change the selected cell to 20 pt
sergij07 [2.7K]
Its right next to pick a subject, the column. <span />
6 0
3 years ago
Read 2 more answers
Bulldog Holdings is a U.S.-based consumer electronics company. It owns smaller firms in Japan and Taiwan where most of its cell
GenaCL600 [577]

Answer:

The answer to the following question is the parent company subsidiary relationship.

Explanation:

This relationship exists when a company controlling another by owning the majority voting of stock.

Generally, a Parent company subsidiary relationship means the relationship which exists when a corporation indirectly or directly owns shares by possessing more than the 50 percent of the voting power of another corporation.

In Parent companies, they can either hands-off or hands-on owners of subsidiaries.

It is virtually same as the holding companies.

5 0
3 years ago
What would I need to make the perfect music video
Lera25 [3.4K]
To make the perfect music video, you would need a bunch of b-roll and clips that relate to the song. If it’s a slow, relaxing song, you want things that are slow and represent peace. If it’s about something specific, you should have a story behind it to explain. Hope this helps! :)
4 0
3 years ago
Other questions:
  • Which file extension indicates that a file is an Adobe Acrobat document?
    13·1 answer
  • What is the output of the following program? #include using namespace std; class TestClass { private: int val; void showVal() {
    5·1 answer
  • What options of the hierarchical star topology within the ANSI/TIA-568-C allow the ability to move the workgroup switches closer
    7·1 answer
  • When it comes to the best possible security for your wireless router, be sure to use WEP encryption to ensure that your transmis
    14·1 answer
  • You want to boot a linux system into singer user mode/ what options might you add to a linux kernel options list in a boot loade
    9·1 answer
  • Explain the SCAN disk scheduling algorithm. Explain why it is sometimes called the Elevator Algorithm.
    9·1 answer
  • Int a = 1; int b = 0; int c = -1; if ((b + 1) == a) { b++; c += b; } if (c == a) { a--; b = 4; }
    7·1 answer
  • Which element is represented by the electron configuration in example B? Example B: 1s22s22p63s23p64s1 Aluminum Cesium Potassium
    12·2 answers
  • Which properties would be useful to know to search for a Word document? Check all that apply.
    7·1 answer
  • What statement describes the last step in evaluating<br> information?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!