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
Neporo4naja [7]
3 years ago
11

Write the definition of a function named averager that receives a double parameter and returns-- as a double -- the average valu

e that it has been passed so far. So, if you make these calls to average, averager(5.0), averager(15.0), averager(4,3), the values returned will be (respectively): 5.0, 10.0, 8.1.
Computers and Technology
1 answer:
vladimir1956 [14]3 years ago
7 0

Answer:

double averager (double &newNumber)

{

static double sum = 0.0;

static int counter = 0;

counter++;

sum += newNumber;

return sum / counter;

}

Explanation:

This exercise is for you to understand how to use variables in functions that have scope outside of the function. The static keyword before a initialising a variable whether int or double or float or string, place the variable on the STATIC MEMORY. This means that when the function ends, those static variables are still usable and can be manipulated with the same stored values.  So when the function sees the

static double sum = 0.0;

for the second time it IGNORES it and continues with the previously stored value.

You might be interested in
You have been tasked with training end users in security best practices and have observed a trend among users in which many are
quester [9]

Hi, A Tech-Savvy here.

Answer:

(C) Lengthen the time period between forced password changes.

7 0
2 years ago
_____ assures the interface will act as the users expect, while _____ assures it will look pleasing. Select one:
Agata [3.3K]

Answer:

C. consistency, aesthetics

Explanation:

Based on the descriptions given to us in the question we can deduce that the answer is C. consistency, aesthetics. This is because "consistency" is defined as something that always delivers the same results, which is what users need from the interface in order to understand it and continue using it. While "aesthetics" is defined as the visual representation of something (how something will look).

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

7 0
3 years ago
Why is OS important in every data processing system? <br>Please Answer Fast! ​
Artist 52 [7]

Answer:

Functions of an operating system. An operating system provides three essential capabilities: It offers a UI through a CLI or GUI; it launches and manages the application execution; and it identifies and exposes system hardware resources to those applications -- typically, through a standardized API.

Explanation:

6 0
2 years ago
Which of the following correctly describes the syntax of an If statement?
Ber [7]

if(Expression to be tested) {

code to execute

} else if(Expression to be tested) {

code to execute

}


you can have as many else ifs as you want. But that's what it looks like.

8 0
3 years ago
In two to three paragraphs, come up with a way that you could incorporate the most technologically advanced gaming into your onl
Marina CMI [18]

nobody cares about plagiarism dude

7 0
3 years ago
Other questions:
  • What is the Multiplier if the change in RGDP is $525,000,000 and initial spending is $100,000?
    12·1 answer
  • What is the first step in the exchange between a web browser and a database?
    7·1 answer
  • Copy the following code and run it. You should break it into the following 3 functions
    6·1 answer
  • You have just purchased a motherboard that has an LGA 1156 socket for an Intel Pentium processor. What type of memory modules wi
    14·1 answer
  • How can you create an illusion of spatial depth in a two-dimensional design?
    15·1 answer
  • A look to different section of the same page is known as_____.
    7·1 answer
  • PLEASE HELP ASAP!!! 99 POINTS FOR 3 MULTIPLE CHOICE QUESTIONS!!! PLEASE ANSWER ALL!!!
    8·1 answer
  • WILL GIVE BRAINLIEST!!!!!!!
    9·1 answer
  • Susan works for a company that values their employees me and deadlines in finding ways to keep the cost of doing business low wh
    12·1 answer
  • Why is it important to do research prior to making a purchase? What types of sources can be helpful (or not helpful!)
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!