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
The part of the computer that provides access to the internet is the
mariarad [96]

Answer:

The Answer B Modem

Explanation:

That is the only way that you want connect to the internet no other part can connect.

Unless you use a ethernet.

Please rate and heart.

thank you for posting this question i am glad i could answer it.

Please make this a brianliest answer thank you.

7 0
2 years ago
Recall that within our BinarySearchTree class the root variable is of type BSTNode. A BSTNode object has three attributes: info
shutvik [7]

Answer:

False ( A )

Explanation:

The implementation is incorrect hence the return would be false and this is because : root.left is supposed to be NULL, root.right is supposed to be NULL and when  these conditions are met then the Binary tree would be empty.

The condition for the above statement would be represented as

if( root.left = = null && root.right == null &&root.info == null)

return true;

else

return false;

7 0
3 years ago
What is one way you can learn about your digital footprint?
Pie

Answer:

Information could be gathered using cookies, which are small files websites store on your computer after your first visit to track user activity.

Explanation:

3 0
3 years ago
Please help! Game design!
kvasek [131]

Answer:

player vs anonymous players

4 0
3 years ago
Look at the following code.int x = 7;int *iptr = &x;What will be displayed if you send the expression *iptr to cout ? What h
masha68 [24]

Answer:

The answer to the given question can be given as:

The value of *iptr is 7. and the value of iptr is dynamic.

Explanation:

In the c++ code, it is defined that x is an integer variable that assigns a value which is 7. Then we define a pointer variable that is *iptr. This variable holds an address of the x variable. When we print the value of the iptr variable. if we use the expression *iptr to print value of the pointer variable by cout that is used in c++ for pint values. so the value of the iptr is 7. If we use the expression iptr sent to cout so we show the address of the variable x. In the pointer, it manages the addresses of dynamically allocated so the address of the variable is changed on execution time.

4 0
3 years ago
Other questions:
  • If johanna wants to label the x- and y-axes, she should click Layout, then
    8·1 answer
  • Write a definition of the function printDottedLine, which has no parameters and doesn't return anything. The function prints to
    14·1 answer
  • Write a C++ program that allows the user to enter double values. Display one of two messages: "The first number you entered is l
    9·1 answer
  • Help me out with this .....
    10·1 answer
  • How to calculate least count of a stopwatch
    8·1 answer
  • The use of themes in WordPress is a good illustration of what major concept?
    6·1 answer
  • Who can search the internet and select element base on important words
    13·1 answer
  • I’ll mark brainliest, thanks
    10·2 answers
  • Display the Approval Form worksheet and create an IF statement in cell B13 to determine if the applicant is eligible for a perso
    7·1 answer
  • How will technology help people with disabilities become more transportation independent?.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!