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
Discuss the main characteristics of the database approach and how it differs from traditional file systems.
Firdavs [7]

The database system allows the creation of a single depository of information, which is updated periodically and which can be used simultaneously by many users, since this type of system allows the effective sharing of all data stored in its depository . In addition, this is a secure system and is very difficult to break into. This is because of the efficiency of the software used to maintain it. However, the use of these softwares can be a little complicated for users, in addition to requiring a high economic cost to obtain them.

The traditional file system, in turn, each user must obtain their own file related to the application they want to run. This may seem dull in comparison to the database, but it is advantageous as it does not require any spending on software, as it is simple and there are several cheap and efficient tools and editors on the market. However, this system is not so safe, it can cause isolation of data and even data inconsistency, which disrupts the entire system.

6 0
3 years ago
Help me with this please​
Gnesinka [82]
Different types of connections are..

-A network is two or more devices connected through links.

-There are two possible types of connections: point-to-point and multipoint.

-A point-to-point connection provides a dedicated link between two devices.

Explain the different types of topologies

-Star network…
In star topology each device in the network is connected to a central device called hub. Unlike Mesh topology, star topology doesn't allow direct communication.

-Ring network…
A number of repeaters are used for Ring topology with large number of nodes, because if someone wants to send some data to the last node in the ring topology

-Bus network…
In bus topology there is a main cable and all the devices are connected to this main cable through drop lines. There is a device called tap that connects the drop 

-tree topology…
Tree topologies have a root node, and all other nodes are connected which form a hierarchy. So it is also known as hierarchical topology. This topology integrates 

-Computer network…
Ring Topology; Star Topology; Mesh Topology; Tree Topology; Hybrid Topology; How to select a Network Topology? Types of Networking Topologies.

-Mesh networking…
Ring Topology; Star Topology; Mesh Topology; Tree Topology; Hybrid Topology; How to select a Network Topology? Types of Networking Topologies.

Different type of networks

-Computer network…
Virtual Private Network (VPN). By extending a private network across the Internet, a VPN lets its users send and receive data.

-LAN…
Using routers, LANs can connect to wide area networks (WANs, explained below) to rapidly and safely transfer data. 3. Wireless Local Area Network (WLAN).

-Wide area network…
Wide area network, or WAN. In terms of purpose, many networks can be considered general purpose, which means they are used for everything from sending files etc.

-Metropolitan area network…
MAN or Metropolitan area Network covers a larger area than that of a LAN and smaller area as compared to WAN. It connects two or more computers that are apart.

-Wireless LAN…
WLAN (Wireless Local Area Network) helps you to link single or multiple devices using wireless communication within a limited area like home, school, or office 

-Wireless network…
A Wireless Local Area Network or WLAN is a network that is used to connect different devices without using wires etc.

-Storage area network…
Storage Area Network is a type of network which allows consolidated, block-level data storage. It is mainly used to make storage last longer etc.

-Personal area network…
PAN can be used for establishing communication among these personal devices for connecting to a digital network and the internet.

-Campus area network…
A Metropolitan Area Network or MAN is consisting of a computer network across an entire city, college campus, or a small region. This type of network is large.

Explain your own understand about protocol and standards

A protocol defines a set of rules used by two or more parties to interact between themselves. A standard is a formalized protocol accepted by most of the parties that implement it.

explain layers in OSI model

Physical, Data Link, Network, Transport, Session, Presentation, and Application.

Explain layers in tcp/ip model

Four layers of TCP/IP model are 1) Application Layer 2) Transport Layer 3) Internet Layer 4) Network Interface. ... It is also known as a network layer. Transport layer builds on the network layer in order to provide data transport from a process on a source system machine to a process on a destination system.

what are the peer to peer processing

In peer-to-peer (P2P) networking, a group of computers are linked together with equal permissions and responsibilities for processing data. Unlike traditional client-server networking, no devices in a P2P network are designated solely to serve or to receive data
5 0
2 years ago
Design a flowchart or pseudocode for a program that accepts three numbers from a user and displays a message if the sum of any t
Keith_Richards [23]

Answer:

Hi there! Pseudocode is the process of writing out the high-level structure of the program in simple English terms which acts as a blueprint of how the program will work. The pseudocode for this question is written below.

Explanation:

Prompt user for input 1

Validate input 1

Prompt user for input 2

Validate input 2

Prompt user for input 3

Validate input 3

Perform checks:

If  

 1 and 2 equals 3

 Or

 1 and 3 equals 2

 Or

 2 and 3 equals 1

Display message to user

6 0
2 years ago
2.24 Write the relevant Python expression or statement, involving a list of numbers lst and using list operators and methods for
miskamm [114]

Answer:

lst = [11, 603, 99, 7, 582, 1];

print("The index of the middle element: " + str(int(len(lst)/2)))

print("The middle element: " + str(lst[int(len(lst)/2)]))

lst.sort()

sorted_lst = lst.reverse()

print("The list in descending order: " + str(lst))

first_number = lst.pop(0)

lst.append(first_number)

print("New lst: "+ str(lst))

Explanation:

- Initialize a list

- Find the middle index, int(len(lst)/2)

- Find the middle element, lst[int(len(lst)/2)]

- Sort the list in descending order (First sort the list in ascending order than reverse it)

- Get the first element using <em>pop</em> method, and append it to the end using <em>append</em> method

- - - - -

a) 0 == 1 == 2 --> Always evaluates false

b) 2 + (3 == 4) + 5 == 7 --> Evaluates true

c) 1 < -1 == 3 > 4 --> Always evaluates false

3 0
3 years ago
select the correct answer from each drop-down menu. “To clean a computer screen, use ___. To clean a keyboard, use a ___.”
ivanzaharov [21]

Answer:

screen - soft cloth

keyboard - paintbrush

6 0
2 years ago
Other questions:
  • Tonya is working with a team of subject matter experts to diagnose a problem with her system. The experts determine that the pro
    14·1 answer
  • Hi Im really a girl and i want to know how to change my username without having to make a new account?
    9·2 answers
  • The right of workers to seek safety and health on the job without fear of punishment is spelled out in:
    8·1 answer
  • Define the missing method. licenseNum is created as: (100000 * customID) licenseYear, where customID is a method parameter. Samp
    14·2 answers
  • Which option describes wearable technology?
    9·1 answer
  • When the code that follows is executed, a message is displayed if the value the user entersvar userEntry = (prompt("Enter cost:"
    11·1 answer
  • Explain<br> the three types of periodic<br>maintanance. .​
    10·1 answer
  • HELP !!! Prompt <br> What is formatting text?
    7·2 answers
  • Please choose the correct answer please tell fast​
    15·1 answer
  • for a given array of integers perform operations on the array return the resulting array after all operations have been applied
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!