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
Find the mistakes in the following code. Not all lines contain mistakes. Each line depends on the lines preceding it. Watch out
Kazeer [188]

Answer:

Explanation:

A null pointer is pointing to nothing, if we can detect if a pointer is null, we can use an "IF" because a null pointer always going to be false, a null pointer even can block an application, because is a result of undefined behavior, it can even cause problems because the compiler can’t tell whether we mean a null pointer or the integer 0, there is a confusion in this kind of pointers.

5 0
3 years ago
What type of function is being performed when a router screens packets based on information in the packet header
Helga [31]

Answer:

"Router screening" is the correct option.

Explanation:

  • A router that philters packets like a firewall. For certain instances, the whole firewall system is such a single scanning router.
  • Often connected to a network stage as well as a container-filter firewall has been the scanning router firewall. This rather firewall operates by filtering protocol characteristics from received packets.

So that the above seems to be the correct approach.

3 0
3 years ago
What is the best resource to learn python?
7nadin3 [17]

Answer:

prolly a snake expert

Explanation:

they know snakes

4 0
2 years ago
Read 2 more answers
Jordan has been asked to help his company find a way to allow all the workers to log on to computers securely but without using
lana66690 [7]

Answer:

Webcam

Explanation:

A webcam is mainly used for taking images or videos from the computer. the webcam is a combination of two basic words i.e. web and camera. webcam can be connected to any computer via USB. It can be mounted on the desktop and sometimes it comes inbuilt on the laptops.

A webcam is also used for face recognition function to login to a computer system.

so according to the scenario, the most appropriate answer is a webcam.

6 0
3 years ago
You want to securely erase data from your hard drive what can you use to do this and what is the process called
tankabanditka [31]
You could Factory Reset a computer or you could smash it with  a hammer
7 0
2 years ago
Read 2 more answers
Other questions:
  • There are N bulbs numbered from 1 to N, arranged in a row. The first bulb is plugged into the power socket and each successive b
    6·1 answer
  • Which css property configures the capitalization of text?
    12·1 answer
  • Which is a benefit of peer-to-peer networking?
    10·1 answer
  • Write the definition of a method printarray, which has one parameter , an array of int s. the method does not return a value . t
    10·1 answer
  • In Word, a red wavy underline indicates a/an
    15·1 answer
  • ) Which is true about the agile method?
    7·1 answer
  • Number are stored and transmitted inside a computer in the form of​
    6·1 answer
  • Question is in photo
    11·1 answer
  • Fwee Pwoints Fwor You
    11·2 answers
  • I am a non-volatile type of built-in memory. I store my contents long-term. My job is to store critical programs that the comput
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!