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 are the similarities between a quineanera and a sweet 16?
Given sinX=0.3 , what is cosX ? Enter your answer as a decimal in the box. Round only your final answer to the nearest hundredth.
Cholesterol is a lipid made in the _______ of animals?
Why did justinian I fail to regain all of the former provinces of the old Roman Empire ? A) his general made military blunders. B) his troops mutinied. C) his a
a number between 10.2 and 10.3 is
Where did most irish immigrants go during the great famine?
All of the following are signs of chemical change except fizzing sound production melting heat production
You are caught on open water during a thunderstorm. what should you do?
what agreements between Roosevelt and Stalin at the Yalta Conference generated the most criticism of Roosevelt after the war?
What does oedipus do when he finds out the truth?