Check whether given Number is Even or Odd?

Answer Posted / subhani

No = Inputbox("Enter a number to check whether it is Odd or Even")

If no mod 2 = 0 then
 msgbox no & " is even."
else
 msgbox no & " is odd."
end if

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is error handling required?

563


Mention what is byref and byval parameters in vbscript?

573


Hi Friends Rajendra this is bhavani prasad, iam working Hyderabad. i faced one problem with qtp recording mode i.e in my application there is 100 records first we click the first record that record will be jumped to next session and 99 records will there stop the recording and run the same script .Run this script qtp does not identify the records. So plz tell me what is the solution.

1564


Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?

2026


Explain about arrays in vb script?

600






after medical test,when will be the police verification

1706


Write a Program to add 2 numbers without using operators (+,-) and without using third variable. Note: Use VBScript only Hint: You can use other operators like '/' & '*'(Division & Multiplication)

3181


1. How to handle object implementation change in DP for Ex: i have login page with username,pasword (editboxes),login,cancel(buttons). Here i written DP code for login page with the help properties. My questions: 1.If properites are changing dynamically i will do (i want code for that) 2.if objects are changed dynamcally i will do (i wnat code for that)

1606


How will you convert a string to lower case string using vbscript?

549


What are the environments supported by vbscript language?

493


What is the difference between vb debugger and the script debugger?

576


What are the 2 ways in which a variable can be declared in the vbscript language?

562


Can anyone send me a vb script function for verifying the functionality of active links on a web page

1590


What is the difference between function and procedure?

563


Explain vbscript in detail?

613