Page

program to find sum and product of given three numbers using java script

<html>
<head><h1><center>sum and product of given three numbers</h1></center></head>
<body>
<script type="text/javascript">
a=parseInt(prompt("enter value for a"," "));
b=parseInt(prompt("enter value for b"," "));
c=parseInt(prompt("enter value for c"," "));
s=(a+b+c);
p=(a*b*c);
document.write("Sum of a,b & c"+"     =  "+s );
document.write("<br>"+"Product of a,b & c      =   "+p );
</script>
</body>
</html>

No comments:

Post a Comment