Addition javaScript

08/10/2009 02:08

<html>

<body>

<!Write javascript program to enter any number and print the number using prompt>

<! Roll no=8>

<script language="javascript" >

var num1,num2,total;

num1=parseInt(prompt("Enter number1",""));

num2=parseInt(prompt("Enter number2",""));

total=num1+num2;

document.write("<font size=5 color=red>");

document.write("Number1="+num1);

document.write("<br>");

document.write("<br>");

document.write("Number2="+num2);

document.write("<br>");

document.write("<br>");

document.write("Addition of two number="+(num1+num2));

document.write("</font>");

</script>

</body>

</html>

 

Back

Search site

Copyright © 2012 Dadaso Zanzane. All rights reserved.