Professional Documents
Culture Documents
Write A Program To Read Arithmetic Expression From User, Evaluate It and Display Answer Using Alert Box
Write A Program To Read Arithmetic Expression From User, Evaluate It and Display Answer Using Alert Box
<html>
<body>
<script lang="Javascript" type="text/javascript">
//ADDITION
result = a + b;
alert("Addition of a & b = " + result);
//SUBSTRACTION
result = a - b;
alert("Substraction of a & b = " + result);
//MULTIPLICATION
result = a * b;
alert("Multiplication of a & b = " + result);
//DIVISION
result = a / b;
alert("Division of a & b = " + result);
</script>
</body>
</html>
Practical 1
<html>
<body>
<script lang="Javascript" type="text/javascript">
</script>
</body>
</html>