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

Write program for identifyig duplicates in flight Departing from and Arriving in mercury tours(web application).

1442


write any ttest cases using check points and parameterization

1818


Mention what is variant in vbscript?

555


Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?

525


Explain about the asc function?

603






What are class variables?

616


write a function to read the items from combobox of Flight reservation & save in excel (QTP)??

2393


Can u describe what kind of testing are for OTC derivates by banks.

1668


How can you fetch the value of a cookie?

548


who will create the object?

1721


How many types of operators are available in the vbscript language?

537


i wrote vbscripit code in notepad i got error i am in learning stage if u ps tell me what wrong in my code my error is "object required descriptive at line one run time error"and my code is "set usernameobj=Descriptive.Create() usernameobj( "name").value="Username" set passwordobj=Descriptive.Create() passwordobj("name").value="password" set signinobj=Descriptive.Create() signinobj("name").value="sigin" browser("gmail").page("gmail").WebEdit("usernameobj").set ("enter username") Browser("gmail").Page("gmail").WebEdit("passwordobj").Set secure.Crypt.Encrypt("enter password") browser("gmail").page("gmail").WebButton("siginobj").click

1417


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

588


Is vbscript a case-sensitive or case-insensitive?

750


Mention what is the difference between vbscript and vba?

519