04-04-2023, 07:38 AM
Code:
num1 = 10;
num2 = 20;
const min = (num1 < num2) ? num1 : num2;
const avg = (num1 + num2) / 2;
const max = (num1 > num2) ? num1 : num2;
document.write("Min = ", min);
document.write("<br>");
document.write("Avg = ", avg);
document.write("<br>");
document.write("Max = ", max);