Saturday 25 January 2014

Program for If-else

<!--Control Structures
It controls flow of execution.
Program for If-else-->
<html>
<head>
<script type="text/javascript">
var a,b,x,y;
a=window.prompt(" Enter First Value","0");
b=window.prompt(" Enter Second Value","0");
x=parseInt(a);
y=parseInt(b);
if(a>b)
window.alert(" A is Big "+a);
else
window.alert(" B is Big "+b);
</script>
</head>
<body>
</body>
</html>

No comments:

Post a Comment