A simple program that I wrote using JavaScript that will ask the user to give three numbers and then the program will solve for the sum of three numbers and display the results on the screen.
My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.
My mobile number here in the Philippines is 09173084360.
My telephone number at home here in Bacolod City, Negros Occidental Philippines is +63 (034) 4335675.
Here in Bacolod City, Negros Occidental I also accepting computer repair, networking and Arduino Project development at a very affordable price.
My personal website is http://www.jakerpomperada.com
My programming website is http://www.jakerpomperada.blogspot.com
I am also a book author you can purchase my books on computer programming and information technology in the following links below.
https://www.mindshaperspublishing.com/
https://www.unlimitedbooksph.com/
If you like my video tutorials kindly click the like button and subscribe for more video tutorials on my channel.
Thank you very much for your help and support.
Sample Program Output
Program Listing
index.html
<!doctype html>
<html>
<head>
<title>Addition of Three Numbers in JavaScript </title>
</head>
<script>
function add_three_number(){
var a,b,c,sum;
a=Number(document.getElementById("first").value);
b=Number(document.getElementById("second").value);
c=Number(document.getElementById("third").value);
sum= (a+b+c);
document.getElementById("answer").value= sum;
}
</script>
<body>
<h2>Addition of Three Numbers in JavaScript </h2>
<br><br>
Enter the First number : <input id="first"><br>
Enter the Second number: <input id="second"><br>
Enter the Third number: <input id="third"><br>
<br><br>
<button onclick="add_three_number()">Sum All</button>
<input id="answer">
</body>
</html>
No comments:
Post a Comment