Friday, 13 September 2024

WRITE A JAVASCRIPT TO CHECK MINIMUM NUMBER FROM THREE NUMBER

 

CODE :-

<html>

               <head>

                              <title>Min-3</title>

                              <script type="text/javascript">

                                             var a,b,c;

                                            

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

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

                                             c=parseInt(prompt("Enter C="));

                                            

                                             if(a<b&&a<c)

                                             {

                                                            document.write("A Is Min="+a);

                                             }

                                             else if(b<a&&b<c)

                                             {

                                                            document.write("B Is Min="+b);

                                             }

                                             else

                                             {

                                                            document.write("C Is Min="+c);

                                             }

                              </script>

               </head>

               <body>

               </body>

</html>


No comments:

Post a Comment