<html>
<script type="text/javascript">
var a=parseInt(prompt("enter the first number "));
var b=parseInt(prompt("enter the second number "));
var c=parseInt(prompt("enter the third number "));
var d=parseInt(prompt("enter the fourth number "));
var e=parseInt(prompt("enter the fifth number "));
var larg=a>b?(a>c?a:c):(b>c?b:c);
var largest=larg>d?(larg>e?larg:e):(d>e?d:e);
var sml=larg<d?(larg<e?larg:e):(d<e?d:e);
document.write("your largest number is="+largest+"<br\>");
var sml1=a<b?(a<c?a:c):(b<c?b:c);
var sml=sml1<d?(sml1<e?sml1:e):(d<e?d:e);
document.write("your smallest number is="+sml);
<\script>
<\html>
No comments:
Post a Comment