Friday, 13 September 2024

WRITE A JAVASCRIPT PROGRAM TO CHECK MAXIMUM NUMBER FROM TWO NUMBER

 

CODE :-

<html>

               <head>

                              <title>Max-2</title>

                              <script type="text/javascript">

                                             var a,b;

                                            

                                             a=parseInt(prompt("Enter A="));

                                             b=parseInt(prompt("Enter B="));

                                            

                                             if(a>b)

                                             {

                                                            alert("A Is Max="+a);

                                             }

                                             else

                                             {

                                                            alert("B Is Max="+b);

                                             }

                              </script>

               </head>

               <body>

               </body>

</html>


No comments:

Post a Comment