yId('fuelEfficiency').value);
            const fuelCost = parseFloat(document.getElementById('fuelCost').value);
            
            if (isNaN(distance) || isNaN(fuelEfficiency) || isNaN(fuelCost)) {
                alert("Please fill out all fields correctly.");
                return;
            }

            // Calculate the cost
            const totalCost = (distance / fuelEfficiency) * fuelCost;

            // Display the result
            document.getElementById('result').innerText = `Total