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
Judy forgot where she saved a certain file on her computer. Therefor, she searches for all files with a jpg file extension. Whic
Keith_Richards [23]
What are these files anyways
6 0
3 years ago
Read 2 more answers
When Clara accesses the programs and documents on her computer by way of icons, she is said to be employing
xxMikexx [17]
<span>D - graphical user interface</span>
5 0
3 years ago
What is the impedance mismatch problem? Which of the three programming
kykrilka [37]

Answer:

The problem that created due to the difference in the model of programming language and the database model.

Explanation:

The practical relational model has three components which are as follows

1. Attributes

2. Datatypes

3. Tuples

To minimize this problem  

1. We switch low pass L-Network to high pass L-network

2. We switch high pass L-Network to low pass L-network

3. We use the impedence matching transformer

3 0
4 years ago
Write a program that reads the balance and annual percentage interest rate and displays the interest for the next month. Python
denis23 [38]

Answer:

Explanation:

The following code is written in Python. It asks the user to enter the current balance and the annual interest rate. It then calculates the monthly interest rate and uses that to detect the interest that will be earned for the next month. Finally, printing that to the screen. A test output can be seen in the attached picture below.

balance = int(input("Enter current Balance: "))

interest = int(input("Enter current annual interest %: "))

interest = (interest / 12) / 100

next_month_interest = balance * interest

print('$ ' + str(next_month_interest))

7 0
3 years ago
You would like to conduct a survey and ask your web page visitors to indicate the computer operating systems that they use. Each
satela [25.4K]

Answer:

<em>A checkbox</em>

Explanation:

A checkbox <em>(check box, tick box, tick box) is an User interface widget that allows the user to choose a binary option.</em>

Like a choice between any of two potential options that are mutually exclusive.

For instance, on a simple yes / no question, the user may have to answer ' yes ' (checked) or ' no ' (not checked).

7 0
3 years ago
Other questions:
  • Questions 1 )When does a spring tide take place?
    14·2 answers
  • What does subscribing to a website’s RSS feed provide to a subscriber?
    10·1 answer
  • A form of speech that is used to clarify, describe, demonstrate, and/or explain is referred to as _____.
    7·2 answers
  • Write a function named firstLast2 that takes as input an array of integers and an integer that specifies how many entries are in
    14·1 answer
  • How network diagram help in scheduling a project? Draw activity network diagram as per given
    7·1 answer
  • You text file begins with the following rows. The pattern is a description of the item to be repaired, its color, and the issue.
    14·1 answer
  • A column does not consist of
    10·1 answer
  • an existing technology that would allow users to transfer images from the camera to the computer without connecting them
    8·1 answer
  • Gaining information by tricking an individual into releasing information is often referred to as.
    15·1 answer
  • ________ helps in determining the cause of a security threat in an incident response plan. Question 7 options: A) Restricting sy
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!