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
Variables defined inside a member function of a class have: Block scope. Class or block scope, depending on whether the binary s
Snowcat [4.5K]

Answer:

The answer is "Block scope".

Explanation:

In the programming, the scope is a code, in which it provides the variable ability to exist and not be retrieved beyond variable. In this, the variables could be defined in 3 locations, that can be described as follows:

  • Inside a method or the block, which is also known as a local variable.
  • Outside of the method scope, which is also known as a global variable.
  • Defining parameters for functions known as formal parameters.
8 0
4 years ago
PLEASE BE CONFIDENT ABOUT YOUR ANSWER
Zigmanuir [339]

Answer: d. should be lowercase.

Explanation:

ID attributes are case sensitive for the most part - DOM and Java Script - which means that the ID attribute does not always have to be lowercase.

It can be uppercase as well. ID attributes can also start with a number and as of HTML 5 can start with a special character as well. Finally, the ID attribute must always be unique within each document.

8 0
3 years ago
Read 2 more answers
How can goal setting help with academic performance?
rosijanka [135]
Im pretty sure the answer is b.
8 0
3 years ago
which of the following is the full path and filename of the file that contains information about which interrupt request (IRQ) c
Drupady [299]

Answer:

INCOMPLETE QUESTION.... Options not provided, However, the answer is

/proc/interrupts

Explanation:

This file records the number of interrupts per IRQ on the x86 architecture. The output of this file is tabular.. with the first column for the IRQ number, another column for each CPU in the system, a third column the reports the type of interrupt and finally the last column holds the name of the device located at that IRQ

7 0
4 years ago
Whose task it is to ensure that the product flows logically from one step to another?
AleksAgata [21]
UX i believe. Web designer and graphic designer are visual which is the basis of UI. Think of UX as User eXperience and in order to have a good experience it has to flow. If it can flow then u can design it. Think of UX as the skeleton and UI is the flesh
3 0
4 years ago
Other questions:
  • What common objects you think will benefit from embedded computers?
    15·1 answer
  • In the lab, the Ethernet II detail of the provided packet capture file indicated that Wireshark had determined that the ________
    5·1 answer
  • Who is the publisher of the book Vertebrates?
    7·1 answer
  • data structureWe have two containers: one has a capacity of three gallons of water, the other five gallons. Both are initially e
    11·1 answer
  • Some touch screens recognize when you touch the screen with two fingers or two hands. If you are looking for a device on which y
    11·1 answer
  • In this lab, you will use all of the graphics commands you have learned to create an animated scene. Your program should have a
    10·1 answer
  • 1. Assume that in an implementation of the RSA cryptosystem one modular squar- ing takes 75% of the time of a modular multiplica
    15·1 answer
  • 3 uses of Microsoft word in hospital
    10·1 answer
  • What is a reason for zipping a file?A. to encrypt themB. to return them to their original sizeC. so they display properly on a W
    7·1 answer
  • For which three everyday activities do people most typically use computers?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!