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

What song contains the line, "Lets be jolly, deck the halls with boughs of holly"?
Give the album to _____ Bob _____ Lisa. What kind of conjunction would complete both blanks in the sentence? correlative conjunction coordinating conjunction
Wendall and Sarah are taking road trips. Wendall travels for 15x miles per hour for x hours. Sarah travels for 6 more hours than Wendall at a speed that is 8 mi
a compys quality control department found an average 5 defective models for every 1000 models that were checked. If the company produced 60,000 models in a year
Was TV available when Galileo alive
can you help me with this problem 5 divided by 0.8 work this out
solve 4(2a-1) = -10(a-5)
Select all that apply. Select the items that have a pH level between 5 and 8. pure water Great Salt Lake saliva ammonia
What brought Lincoln national fame?
how can i find the acceleration?(rope and grinder have no weight) *** sorry for my english