Question
I have this code but it is not working or giving my any output I need the code to calculate this formula (P * D)
I have this code but it is not working or giving my any output I need the code to calculate this formula (P * D) / (2 * SMYS * DF * T * E)
can anyone tell me what is the problem or edit the code
Enter inputs
document.getElementById('calculate').addEventListener('click', function() {
var amount = document.getElementById("P").value();
var amount = +P;
var quantity = document.getElementById("D").value();
var quantity = +D;
var amount = document.getElementById("SMYS").value();
var amount = +SMYS;
var amount = document.getElementById("DF").value();
var amount = +DF;
var amount = document.getElementById("T").value();
var amount = +T;
var amount = document.getElementById("E").value();
var amount = +E;
var total = (P * D) / (2 * SMYS * DF * T * E);
document.getElementById("total").value = total;}
);