JavaScript Greater Then (if...else if).
This is JavaScript Practical :- Greater Then (if...else if).
Script written in small letter because JavaScript Case Sensitive.
Script:-
<html>
<head>
<title>greater than
</title>
</head>
<body>
<script type="text/javascript">
var A=parseInt(prompt("enter A"));
var B=parseInt(prompt("enter B"));
var C=parseInt(prompt("enter C"));
if (A > B && A > C)
{
document.write("A is big");
}
else if (B > C)
{
document.write("B is big");
}
else
{
document.write("C is big");
}
</script>
</body>
</html>
Save the File .html
Output:-
If you have any doubts mention on the Comment Box.
Please follow the my Blog, Share and Comment.
Comments
Post a Comment