abass123m abass123m
  • 11-03-2021
  • Computers and Technology
contestada

Write a program to compute the maximum and minimum value of three numbers:

Respuesta :

ejbuhain ejbuhain
  • 11-03-2021

Answer:

in javascript:

function compute(a, b, c){

let array = [a, b, c];

array.forEach((e,k) => {

if(e >= a && e >= b && e >= c){

console.log("maximum: " + e);

}  

if( e <= a && e <= b && e <= c){

console.log("minimum: " + e);

}

}

}

Explanation:

Answer Link

Otras preguntas

how does the structure of the pencil relate to its function?
Select all choices that apply. 7. (1 pt) Mark the statement if it accurately describes Magellan’s expedition. A. Three of the original five ships returned home
Which of the following statements is true of the Gulf of Tonkin affair? A. Congress was divided and only reluctantly passed the Gulf of Tonkin Resolution. B. Jo
when did muhammad begin teaching people about islam
HELP ME HELP ME AAAAAAAAAAAAAAAAAAA HELP
A recreation center charges nonmembers $3 to use the pool and $5 to use the basketball courts. A person pays $42 to use the recreation facilities 12 times. How
briefly define protein complimentarity
the temporary capital of the united states in 1789 ?
how do you think the attributes of each army might affected its performance in battle
how were minorities at a disadvantage during the great depression