Switch to full style
ASP/ASP.net examples
Post a reply

check if number is odd or even

Sun Apr 03, 2011 9:28 pm

Following code checks if number is odd or even using s function checkEvenOdd
Code:
<% 
function checkEvenOdd
(ByVal intValue) 
If 
(intValue MOD 2 = 0 ) Then 
Response
.Write ("The number is <b>even</b><br>") 
Else 
Response
.Write ("The number is <b>odd</b><br>") 
End If 
end function 
%>
 




Code:
<% 
checkEvenOdd
(2) 
%>
 


The output is
Code:
The number is even .




Post a reply
  Related Posts  to : check if number is odd or even
 check empty number     -  
 convert integer number to octal,hexadecimal number systems     -  
 convert octal number to decimal number     -  
 convert decimal number to octal number     -  
 Check DNS error     -  
 check if domain name is taken by php     -  
 check if file exists     -  
 code for check availability     -  
 check folder content using asp     -  
 Check empty string     -  

Topic Tags

ASP Validation