const input_number1 = document.querySelector("#input-number1");
const input_number2 = document.querySelector("#input-number2");
const input_number3 = document.querySelector("#input-number3");
const output = document.querySelector("#output");
const btn_submit = document.querySelector("#btn-submit");

function max(lhs, rhs)
{
    return (lhs > rhs ? lhs : rhs);
}

function max3(lhs, mid, rhs)
{
    return max(max(lhs, mid), rhs);
}

btn_submit.addEventListener("click", (event) => {
    const number1 = input_number1.value;
    const number2 = input_number2.value;
    const number3 = input_number3.value;
    const result = max3(number1, number2, number3);
    output.textContent = `Max number is: ${result}`
});
