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

Science is the favorite subject of 74% of students at a school. There are 700 students at the school, How many of them like science best?
In 2012, California had a population of about 38 million people, and North Dakota had a population of about 699,000 people. What is the difference in population
How is the Paciic continental margin in comparison to the Atlantic continental margin?
how do i find the measure of these? i’m lost in math
options are 1. 2. 3. 4. please help me ill mark u brainlest
Solve the equation for x: |5 + 8 + 2x| = 21
Solve the proportion. 2/3=3/q
4. You run from your house to a friend's house that is 3 miles away. You then walk home. What was your displacement?
Bob can complete his Math homework in 2.5 hours, but if he works with Joe they can finish in 1.5 hours. How long would it take Joe to finish his homework on his
PLS HELP I WILL MARK BRAINLIEST!!​