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

Why does land heat up more faster than water?
What is the quotient of -1 4/5 and 2 1/4?
How does 4/15=14/n? What does n equal?
Why does land heat up more faster than water?
What kind of particles make up compound
Search results for "A shipment of 18 cars, some weighing 3,000 pounds, and the others weighing 5,000 pounds each. Together the shipment has a total weight of 30
Search results for "A shipment of 18 cars, some weighing 3,000 pounds, and the others weighing 5,000 pounds each. Together the shipment has a total weight of 30
List 3 commercial uses of sponges.
Why does land heat up more faster than water?
What is the quotient of -1 4/5 and 2 1/4?