Write A program to print Operator using Javascript (using variable).
Code : operator.html
<!-- write a program to use ofarithmatic operators of java script -->
<html>
<head>
<title>Arithmatic operator </title>
<style type="text/css">
.body
{
font-size:30;
color:blue;
{
</style>
</head>
<body class="body">
<script type="text/javascript">
var a=10;
var b=5;
var n="pooja";
var s="rathod";
var c= n + s;
var add= a + b; // addition operator
var sub= a - b; // substraction
varmul= a * b; // modulous
var div= a / b; // division
var mod= b % a; // multiplication
document.write("Addition operator : ", + add);
document.write(" And ");
document.write(c);
document.write("</br>");
document.write("Substraction operator : ", + sub);
document.write("</br>");
document.write("multiplication operator :", + mul);
document.write("</br>");
document.write("Division operator : ", + div);
document.write("</br>");
document.write("Modulus operator : ", + mod);
</script>
</body>
</html>
No comments:
Post a Comment