<html>
<head>
<script language="javascript">
function compare(a,b)
{
if(a>b)
{
return a;
}
else
{
return b;
}
}
</script>
</head>
<body>
<script language="javascript">
var x=parseInt(prompt("Enter first value",0));
var y=parseInt(prompt("Enter second value",0));
alert("Greater is "+compare(x,y));
</script>
</body>
</html>
<head>
<script language="javascript">
function compare(a,b)
{
if(a>b)
{
return a;
}
else
{
return b;
}
}
</script>
</head>
<body>
<script language="javascript">
var x=parseInt(prompt("Enter first value",0));
var y=parseInt(prompt("Enter second value",0));
alert("Greater is "+compare(x,y));
</script>
</body>
</html>
No comments:
Post a Comment