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 is the difrence18.14and 9.88​
What is the slope of the line represented by 5x – 7y = 9?
Solve the inequality for 0 0
Someone PLZ HeLP!!!what is good governancePlzz answer in your own words and plz don't copy from goo gle,,because I need to get 6 different respondents​
can someone help me out please asap
In your words, Define Translation and list 3 Characteristics of a translation.
An investment of $5000 has an annual growth rate of 8% for 3 years a) How much is the investment worth if the interest is compounded quarterly?
What is $980.17 rounded to the nearest 10 dollars?
How many liters are in 3.45 moles of oxygen gas at STP? A) 2.08 x 10 24 L B) 110.4 L C) 77.28 L D) .15 L
Using French or English resources, either the Internet, online newspapers (www.lemonde.fr or www.jdd.fr for French newspapers), magazines, library, books... 1-