Showing posts with label positive and negative number checker version 2. Show all posts
Showing posts with label positive and negative number checker version 2. Show all posts

Wednesday, August 1, 2018

Positive and Negative Number Checker Version 2 in JavaScript

Here is the version two of my program to check if the given number in JavaScript is a positive or negative number.

I am currently accepting programming work, it project, school 

programming projects , thesis and capstone projects, IT consulting 

work, computer tutorials and web development work kindly contact me in the following email address for further details.  If you want to advertise in my website kindly contact me also in my email address also. Thank you.
My email address are the following jakerpomperada@gmail.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.





Sample Program Output


Program Listing

index.htm

<html>
<head>
<style>
    body {
      font-family:arial;
  background-color:lightgreen;
  font-size:24px;
  font-weight:bold;
      }
</style>
<script>
function num()
{
var no;

no=Number(document.getElementById("no_input").value);

if (no==0) {
alert("The given number " + no + " is positive number.");
document.getElementById("no_input").value="";
document.getElementById("no_input").focus();
}
else if (no>=1) {
 alert("The given number " + no + " is positive number.");
 document.getElementById("no_input").value="";
 document.getElementById("no_input").focus();
}
else
{
 alert("The given number " + no + " is negative number.");
 document.getElementById("no_input").value="";
 document.getElementById("no_input").focus();
}

}
</script>
</head>
<body>
<br>
<h2> Positive and Negative Number Checker </h2>
<br>

Enter any Number: <input id="no_input">
<button onclick="num()">Check</button></br></br>
</body>
</html>