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

Tom's mark of a maths test was 68.This was 20% worse than his mark in English.what was Tom's English mark ?
the value of a car depreciates by 18% per year work out the current value of a car brought 4 years ago
Solve the following system. y=-2x^2+3x-1 and x+y=-1 The solutions are ___ and ___.
The property tax that raises the most revenue for local governments is the tax on a. automobiles. c. real estate. b. intangible personal property. d. tangib
Order the following masses from least to greatest: 500 g, 50 kg, 5000 mg
help please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I deli is open five days a week for five hours each day. one week in the deli served 925 customers. if the same number of customers were served each hour, how m
Help please !!!!!!!!!!
Cost of sled $99.50 markup 95%
how do primary and secondary sources help us learn History