Tuesday, 20 January 2015

Javascript Page to add two number

<!--Javascript Page to add two number-->

<html>
<head>
<title>
Addition
</title>
<script type="text/javascript" >
var a;
var b;
var c;
a=window.prompt("Enter first no.");
b=window.prompt("Enter second no.");
a=parseInt(a);
b=parseInt(b);
c=(a+b);
window.alert("Sum of "+a+" and "+b+" is "+c);
window.confirm("Is your answer correct");
document.write("");
</script>
</head>
<body>
<em>Program to add two number.</em>
</body>
</html>

No comments:

Post a Comment

Read contacts in iOS using Swift with error handling

Just copy and paste the below code Pre-step before pasting the below code Add below line in AppDelegate.swift file below import statement ...