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
sergey [27]
3 years ago
14

Write a method that computes the average of the values in an array of doubles. The header of the method is as follows:

Computers and Technology
1 answer:
Ber [7]3 years ago
3 0

Answer:

Written in Java

public static double average(double[] x){

   double sum = 0.0;

   for(int i=0;i<x.length;i++){

       sum+=x[i];

   }

   return sum/x.length;

}

Explanation:

This defines the method

public static double average(double[] x){

This initializes sum to 0.0

   double sum = 0.0;

This iterates through the array

   for(int i=0;i<x.length;i++){

This adds up items of the array

       sum+=x[i];

   }

This returns the average

   return sum/x.length;

}

<em>Attached to this program is the full program that include the main method of the program</em>

Download txt
You might be interested in
How to disable Fortinet?
Anni [7]

Answer:

Click on the start menu and go to the control panel. Video of the Day.

Click "Programs and Features" to launch the programs and features window.

Scroll down the window, click "Fortinet Antivirus," and then click the uninstall button.

Explanation:

8 0
2 years ago
In the __________ Standard, chemical manufacturers, importers, and distributors are required to provide hazard information by wa
Bas_tet [7]
The correct answer is C
5 0
4 years ago
Write a program that prints the following 45 pairs of numbers:
sattari [20]

Answer:

  • Code is in JAVA language. As there is no user input the logic is straightforward.
  • Below is the code along with a detailed explanation of the logic.
  • The class name is Print main save as file as the main class.

Explanation:

Program:-

public class Main{

public static void main(String args[]){

/* There are two for loops...

* First for loop runs from i=1 to i=9

* Second for loop runs from j=1 to j=i.

*

*/

for(int i=1;i<=9;i++){

for(int j=1;j<=i;j++){ // j loop runs from j=1 to j=i

/*Prints I and j next to each other*/

System.out.println(i+""+j);

}//for loop of j ends here

}// for loop of I ends here

}

}

6 0
3 years ago
What must your motherboard have to use bitlocker encryption in windows 7 which will ensure that your hard drive cannot be used i
Gala2k [10]

your motherboard must have TPM Chip to use bitlocker encryption in windows 7 which will ensure that your hard drive cannot be used in another computer.

<h3 /><h3>What is a motherboard?</h3>
  • The primary printed circuit board (PCB) of all-purpose computers and other extensible systems is called a motherboard.
  • The primary printed circuit board (PCB) of a computer is called the motherboard. All components and external peripherals connect to a computer's motherboard, which serves as its main communications hub.
  • It offers connections for various peripherals and retains and enables communication between many of the critical electrical parts of a system, including the memory and central processor unit (CPU).
  • In contrast to a backplane, a motherboard frequently houses important sub-systems such the central CPU, input/output and memory controllers for the chipset, interface connections, and other parts that are integrated for general usage.
  • Specifically, a PCB with expansion capability is referred to as a motherboard.

To learn more about motherboard, refer to the following link:

brainly.com/question/15058737

#SPJ4

6 0
2 years ago
1. Which of the following options will allow you to insert a quick table? (1 point) Insert ribbon &gt; Shapes drop-down menu
emmasim [6.3K]
Quick tables are tables<span> that are stored in galleries as building blocks and can be reused and accessed at any time.</span>
The following option will allow you to insert a quick table:
Insert ribbon -> Table drop-down menu

Yous should click on the ribbon (tab) Insert and then from the Table drop-down in the Tables group, select Quick Tables.
5 0
3 years ago
Read 2 more answers
Other questions:
  • All languages from the second generation on must be translated into machine language for the computer to be able process the inp
    8·1 answer
  • Given a one dimensional array arr, what is the correct way ofgetting the number of elements in arr
    15·1 answer
  • When Liam went to print his presentation, the boot process established the connection to the printer, sent the presentation to t
    12·1 answer
  • A file named numbers.txt contains an unknown number of lines, each consisting of a single positive integer. Write some code that
    6·1 answer
  • What are horizontal and vertical page break? how and where are these inserted?​
    10·1 answer
  • Which of the following correctly declares and initializes a Scanner object that will use input from the keyboard as its data sou
    13·2 answers
  • Which of the following is not a data visualization technique?
    6·1 answer
  • Imagine that a team of scientists test a certain hypothesis, and the experimental results show that it is false.
    6·1 answer
  • Anyone want to play mine mincraft w/ me?
    9·1 answer
  • the 4gl languages that enable nonprogrammers to use certain easily understood commands to search and generate reports from a dat
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!