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

How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...

2905


What are the valid scopes of a variable in vbscript?

610


How to open excel in vb script?

572


Explain the support of asp for vb script functionality?

637


How will you get the exponent of the given number in vbscript?

563






Which loop is used in case of arrays in the vbscript language?

524


What are the properties of regexp object?

581


who will create the object?

1483


How to take whole text output from screen of Bitmap Application.

1873


What is the difference between function and procedure?

576


Explain a few date functions in vbscript

558


what is the differance between BYVAL,BYREF?

1770


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

558


Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?

806


How can you create an object in vbscript?

616