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

i)Find the first term of a G.P. whose fifth term is 243 and thecommon ratio 3.​
Mentor Text: "An hour of TV class, an hour of basketball or baseball or running, another hour of transcription history or painting pictures, and more sports, bu
6y + 4 – 3y = -5 + y + 17
Question 6 of 10 Which two important events in American history occurred in the 1930s? O A. the end of segregation and World War II O B. the Red Scare and the c
Find the slope of the line that passes between the points (4, 3/8) and (6, 7/8)
Visitors to these parks can swim in the morning and watch the wild West show before dinner. what is it complex, simple, compound, compound-complex?​
A slope of -5 that passes through (2,15)
Vithout motivation, nothing would get done in this world. T or F
HELP ME PLZZ I NEED HELP WITH THIS!!
Run 4 1/2 kilometers in 1/3 of an hour how many kilometers can she run in 1 hour