mohammadshanzidulhoq mohammadshanzidulhoq
  • 09-03-2021
  • Computers and Technology
contestada

Write an algorithm to find the average of three numbers: 10, 20, 30

Respuesta :

Аноним Аноним
  • 09-03-2021

Language: JavaScript

Answer:

let num = [10,20,30];

average(num);  

function average(num) {

 let sum = 0;

 for(let i in num) {

   sum += num[i];

 }  

 return console.log(sum/num.length);

}

Answer Link

Otras preguntas

When Sarah divided a number by 5, the quotient was 247 with a remainder. What is one possible dividend? With a complete sentence, explain how you found the divi
5. Which of the following best describes the effect of coral bleaching on corals? A. As temperatures increase, corals lose symbiotic algae, which provide most o
Which expression is equivalent to 2(y+4)+3(x+2x) The answers I have as multiple choice is 1. 2y+8+9x 2. 2y+4+9x 3. 2y+4+5x 4. 2y+8+5x
consideramos que el lobo es un personaje estereotipo explicamos​
Which of the following numbers, on the pH scale, would indicate that a substance is acidic? Group of answer choices 12.0 13.5 8.0 5.0
How is combustion similar to cellular respiration?.
You can ride your bike around your block twice and the whole neighborhood once in 10 minutes. You can ride your bike around your block twice and the whole neigh
PLSSS HELP IF YOU TURLY KNOW THISS
What is The special fluid that helps the bones
1,3,1,3,15,18,23,28,33 two numbers that are divisible by 4