Check whether given Number is Even or Odd?

Answers were Sorted based on User's Feedback



Check whether given Number is Even or Odd?..

Answer / styxopty


i = cint(inputbox ("Enter any Number to check Even or Odd"))
if i mod 2 = 0 Then
msgbox i&" is Even"

else
msgbox i&" is Odd"
end if

Is This Answer Correct ?    6 Yes 3 No

Check whether given Number is Even or Odd?..

Answer / 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

More VB Script Interview Questions

What is loose binding? Why is it not a good practice to use it?

0 Answers  


How will you generate Reports using Vb Script?it asked in testing(QTP)Interview.Plz Any Body Let me know. Thanks uday Uday_testing@yahoo.co.in

4 Answers   NIIT,


Mention what is the use of option explicit in vbscript?

0 Answers  


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)

0 Answers   Quest,


Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642

7 Answers   Amazon,






i need to sort the data using qtp script for this how i need to write a qtp script

0 Answers  


How to Import data from a file (file is on the desktop) to the data table

0 Answers   IBM,


write a vb script to find the size of d drive?

3 Answers  


I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?

0 Answers  


Explain about scrrun.dll in vbscript?

0 Answers  


how to acces the remote mechine using vb cript(QTP)

0 Answers   TCS,


What's the difference between vbscript and vb.net?

0 Answers  


Categories