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
What is an administrator?
Drupady [299]
A person responsible for running a business, organization, etc.
3 0
3 years ago
A user's computer will not boot. A technician notices four indicator lights on the backside of the
vaieri [72.5K]

Answer:

B.

Explanation:

Computer manual is the user guide that comes along with the computer set to inform the users about the functions, ways to assemble the parts, and so on.

The user manual consists of guide for the users specially for electronic products such as computers, refrigerators; softwares, and so on. These manuals are written by technical writers, programmers, etc.

<u>In the given scenario the technician needs to refer to computer manual to know the meaning of the lights on the backside of the computer.</u>

So, the correct answer is option B.

6 0
3 years ago
The operating system is not directly involved in one of these tasks.Immersive Reader
Alex73 [517]
Displaying a web page
3 0
3 years ago
Which of the following is a good way to improve your credit score?
Ganezh [65]
The answer is chope this helps
6 0
3 years ago
The process of capturing moving images on film or a digital storage device is called?
galben [10]

Answer:

Cinematography

Explanation:

Cinematography is the blend of art and science and it deals with the recording of moving images on film or a digital storage device.

While making a movie some example of cinematography are the conclusions reached about lighting, camera filters, lenses etc.

6 0
3 years ago
Other questions:
  • 1. The graphical representation of the users character of alter ego is their:
    11·1 answer
  • How is the Task Manager helpful in displaying which resources your computer is using and how fast?
    5·2 answers
  • A snail goes up A feet during the day and falls B feet at night. How long does it take him to go up H feet? Given three integer
    8·1 answer
  • A______ is a graphical representation of numeric data.
    8·1 answer
  • g Write a function named vowels that has one parameter and will return two values. Here is how the function works: Use a while l
    9·1 answer
  • Which one you choosing? PS5 OR THE XBOX SERIES X???
    14·2 answers
  • What does BGP use by default to calculate the best route?
    15·1 answer
  • Create an application that determines the final cost of food items and non-food items, assuming only non-food items are taxed. T
    8·1 answer
  • What is one way a pivottable could combine the following data?
    8·1 answer
  • Question 9
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!