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
Dafna1 [17]
3 years ago
6

Calculating mean for even number and use while looppleas help me ​

Computers and Technology
1 answer:
vladimir2022 [97]3 years ago
8 0

Answer:

Here is my answer in Javascript

num = 0;   // Use to calcate the even numbers

loop = 10; // Use for the highest even number that will be calcated for

index = loop/2; // Calcate the size of the array based upon how many loops their

let arr = [index]; //Create array to store the even numbers

let i = 0; // Use to keep track of which on what number in the while loop we are on  

let total = 0; //Used to add up all of the even numbers

let mean = 0; //Used to calcate the mean of all even numbers

do {

 i = i + 1; //Keep track of what loop we are on

 num = num + 2; //Used to calcate the even number

 arr.push(num); //Push the num into a array

 total = total + arr[i]; //Calcate the total of the array

 mean = total / i; //Calcate the mean

}

while (num != loop);

//Output the result

console.log(mean);

You might be interested in
A7DF is the hexadecimal representation for what bit pattern?
kipiarov [429]

Answer:

1010 0111 1101 1111

Explanation:

A = 10 in decimal = 1010 in binary

7 = 7 in decimal = 0111 in binary

D = 13 in decimal = 1101 in binary

F = 15 in decimal = 1111 in binary

Therefore 0xA7DF = 1010 0111 1101 1111 in binary

6 0
3 years ago
Web navigation gives the user a sense of control.
Leviafan [203]
1. a.
2. d
3. b
I hope this helps
6 0
3 years ago
Read 2 more answers
What could be one possible reason where the recipient is not guaranteed that the data being streamed will not get interrupted?
IRINA_888 [86]

One possible reason could be low network bandwidth, where the maximum data throughout allowed by the network is insufficient to accommodate the large amount of data being streamed.

Let me know if you have any questions.

3 0
3 years ago
We look for trends when we are looking at data. What is a trend?
yulyashka [42]
A subject of what people say at the time, most used, famous at the present time
4 0
3 years ago
Read 2 more answers
Gas giants have rings and satellites.
user100 [1]
Gas giants DO have rings and satellites.
It's true.
6 0
3 years ago
Read 2 more answers
Other questions:
  • Consider the following classes:
    8·1 answer
  • Programming Using OOJAVA<br> check this Atterchment and solve Exascies 1, 2, and 3
    10·1 answer
  • Apple users tend to like the company and love its products. Apple has successfully nurtured this __________ component of its cus
    15·1 answer
  • A technician needs to be prepared to launch programs even when utility windows or the Windows desktop cannot load. What is the p
    11·1 answer
  • What two devices in a computer should be considered "black boxes," and should never be opened due to risks involving charged cap
    13·1 answer
  • When you are almost done with your soup and want to get at the last little bit, how should you do this 2
    5·1 answer
  • What is copy and paste?
    13·2 answers
  • Given three packets of size 2,500 Bytes (caution this is Bytes not bits) each are ready inside computer 1 to be transmitted onto
    14·1 answer
  • Atheel tests a program and gets a NameError. How can this be fixed?
    13·2 answers
  • True or False: A sequential search of a list assumes that the list elements are sorted in ascending order.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!