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
You are applying for a secretary position. You have many skills but which of the following would not be one to include on the ap
zepelin [54]

A. How many marathons you have run, because it doesn't relate to the job you're applying for.

6 0
3 years ago
Read 2 more answers
You need to know the MAC address of a Windows 8 computer. How can you accomplish this?
Gre4nikov [31]

1.press window key + R

2.type cmd and press enter

3. write "ipconfig /all" without quotes and press enter

4. look for physical address word

that's your Mac address

6 0
3 years ago
It is ________ to pass an argument to a function that contains an individual array element, such as numbers[3].
Lapatulllka [165]

Answer:

The answer is "option B".

Explanation:

In the C++ programming language, it is legal to pass a parameter in the method that includes an individual array element. where an array is a collection of homogeneous (similar types of) elements. and other options are not correct that can be defined as:

  • In option, a Passing argument in a function is not illegal in c++.
  • In option c, It is recommended by the ANSI committee.
  • In option d, It is good for practice in coding.
5 0
3 years ago
A slide show is another name for a PowerPoint presentation. <br> a. True<br> b. False
ruslelena [56]
It is true because a powepoint is a projecter

8 0
3 years ago
Read 2 more answers
Descuss the five generations of Computer language
Fiesta28 [93]

Answer:

Explanation:

The programming language in terms of their performance reliability and robustness can be grouped into five different generations, First generation languages (1GL) Second generation languages (2GL) Third generation languages (3GL)

6 0
3 years ago
Other questions:
  • The final element of an e-mail message should be
    15·1 answer
  • How are the internet and the World Wide Web different from each other
    14·1 answer
  • A structure that specifies which of a number of permitted data types (e.g. integers) that may be stored in its instances is:
    6·1 answer
  • Which button will allow you to insert quotes and notes into text into a document​
    12·1 answer
  • __________ is a program that lets you share documents online with others.
    12·2 answers
  • Which famous individuals was born on october 31st?
    7·1 answer
  • Which line in the following program will cause a compiler error? 1 #include 2 using namespace std; 3 int main() 4 { 5 int number
    12·1 answer
  • How to cheat on asseeprep
    6·1 answer
  • This is gonna be very long but I have no idea what to do, I'm confused.
    6·1 answer
  • Explain why computer professionals are engaged in technical services
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!