Generation

generate functionWed, 19 Apr 2023

Encontrar el mayor, el menor y el intermedio de 3 números

function biggest(a, b, c) { if (a > b && a > c) { return a; } else if (b > a && b > c) { return b; } else if (c > a && c > b) { return c; } } function smallest(a, b, c) { if (a < b && a < c) { return a; } else if (b < a && b < c) { return b; } else if (c < a && c < b) { return c; } } function middleNumber(a, b, c) { if ((a > b && a < c) || (a < b && a > c)) { return a; } else if ((b > a && b < c) || (b < a && b > c)) { return b; } else if ((c > a && c < b) || (c < a && c > b)) { return c

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant