function calculateApple() {
const input1 = parseFloat(document.getElementById(“input1”).value);
const input2 = parseFloat(document.getElementById(“input2”).value);
const input3 = parseFloat(document.getElementById(“input3”).value);
if (isNaN(input1) || isNaN(input2) || isNaN(input3)) {
alert(“Please enter valid numbers.”);
return;
}
const result = input1 + input2 + input3;
document.getElementById(“result”).value = result.toFixed(2);
}
function resetApple() {
document.getElementById(“apple-calculator-form”).reset();
}