Space for google add

To Display Subtraction, Multiplication.

 


Write JavaScript code to display  Addition Subtraction, Multiplication of two numbers. (Using alert() & confirm() method of the window object )



Programme :- 

 

       <html>

       <body>

          <h4><center><font face="Algerian">

                       Addition, Subtraction, Multiplication of two numbers.

          </h4></center></font>

                        <script language="javascript">

 

                          var A,B,C ,S,M

      A = 100, B = 20,

     C = A + B ,S=A-B, M=A*B

 

     alert("A = 100")

                                      document.write ("<center>A = 100</center>")

     alert("B = 20")

                                      document.write ("<center>B = 20</center>")

    document.write ("</br>")                

                       

    document.write ("<center>Addition</center>")

                                                                    document.write ("<center>A+B=",C)

                     

    document.write("<center>Subtraction</center>")

                                                                   document.write ("<center>A-B=",S)

                     

   document.write("<center>Multiplication</center>")

                                                                  document.write ("<center>A*B=",M)

   confirm ("Are you want to close this web page??")

                   

                        </script>

     </body>

     </html>

 

 

 

    Alert Box:-

 







 

 

 

 

 

 

 

 

Post a Comment

0 Comments