ujwal java
ujwal java
SHREE
POKHAR
IYA
SECOND
ARY
SCHOOL
EXAMPLE NUMBER=6
<!DOCTYPE html>
<html>
<head>
<title>First java script</title>
<body>
<script type="text/javascript">
document.write("You are Programmer.");
alert("Thanks for visiting my website.");
confirm("Please provide Accurate code");
prompt("enter your code:");
</script>
</body>
</head>
</html> OUTPUT: a= 25, b=10, a+b=65, a-b=-15 ,a*b=1000 ,a/b=0.625, a%b=25, Example
of a++=26 ,Example of b--=39
EXAMPLE NUMBER=10
<html>
<body>
<script type="text/javascript">
var n=prompt("enter a number=");
if(n%2==1)
document.write("number is odd" +n);
else
document.write("number is even" +n);
</script>
</body>
</html> OUTPUT: Enter any number= If the remainder is “0,” then it is an even number; if
the remainder is 1, then it is an odd number.
EXAMPLE NUMBER=11
<html>
<body>
<script type="text/javascript">
var count=1;
var f=1;
var i,n;
n=prompt("enter the number to calculate=")
for(i=1;i<=n;i++)
f=f*i;
document.write("<br> The fractional is="+f);
</script>
</body>
</html> OUTPUT: Enter the any number to calculate=If no is 4 then value is 24
EXAMPLE NUMBER=12
<html>
<body>
<script type="text/javascript">
var a =10;
var b =23;
var max;
document.write("<br>a=10<br>b=23");
max=(a>b)?a:b;
document.write("<br>the maximum numberis=");
document.write(max);
</script>
</body>
</html> OUTPUT: value of a =>10, value of a +=>15 ,value of a -=>10, value of a *=>50,
value of a /=>10, value of a %=>0