Space for google add

To Display Addition , Subtraction ,Multiplication .(Using Prompt & ParseInt)

    


Write JavaScript code to display Addition, Subtraction, Multiplication of two numbers (Using Prompt & ParseInt).

 Programme :- 


<html>

<body>

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

                                                       Addition,Subtraction,Multiplication of two number using Prompt & ParseInt.

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

             

                                               <script language="javascript">

                                                                                                                                                                                   

                                              A=prompt("Enter A", "A" )

          document.write("A = ", A )

document.write("<br/>")

 

                                              B=prompt("Enter B","B")

          document.write("B =", B)

document.write("<br/>")

 

 

                                              C=(parseInt(A)+parseInt(B))

document.write("<br/>")

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

document.write("<br/>")

 

                                              C=(parseInt(A)-parseInt(B))

document.write("<br/>")

          document.write(" A-B  = " , C)  

document.write("<br/>")

                                                                                                        

                                          C=(parseInt(A)*parseInt(B))

document.write("<br/>")                                                                                                      

document.write("A*B=" , C)                                                                                                       

                                                               

                                              </script>

 </body>

</html>






















Post a Comment

0 Comments