Practical 8
Practical 8
1)Write a program using javascript To accept two integer and display large number of them.
large.html
<!DOCTYPE html>
<head>
</title>
</head>
<body>
<script language="javascript">
var a,b;
if(a>b)
else
</script>
</body>
</html>
================output=============
b is larger than a
2)write a program using javascript To accept integer and display the result multiplying it with 3.
multiply.html
<!DOCTYPE html>
<head>
</title>
</head>
<body>
<script language="javascript">
var a,no,ans;
no=parseInt(a);
ans=no*3;
</script>
</body>
</html>
===========output============
<!DOCTYPE html>
<head>
</title>
</head>
<body>
<script language="javascript">
var a,no;
no=parseInt(a);
if(no>0)
document.write("Number is Positive");
else
document.write("Number is Negative");
</script>
</body>
</html>
=========output===============
Number is Positive
Number is Negative