Q:

Write a JavaScript program to calculate multiplication and division of two numbers (input from user)

0

Write a JavaScript program to calculate multiplication and division of two numbers (input from user). 

Sample form :
sample form

 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

function multiplyBy()
{
        num1 = document.getElementById("firstNumber").value;
        num2 = document.getElementById("secondNumber").value;
        document.getElementById("result").innerHTML = num1 * num2;
}

function divideBy() 
{ 
        num1 = document.getElementById("firstNumber").value;
        num2 = document.getElementById("secondNumber").value;
document.getElementById("result").innerHTML = num1 / num2;
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now