Check whether given Number is Even or Odd?

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.

1625


What are string functions in vbscript?

658


create a form to accept username and password validate the username and password with using message box, display the corresponding user message

2163


If else for do while select in vb script?

645


give me any information abou vb script books learn quckly

1661






Explain about vb script?

751


How are values assigned to the variables in the vbscript language?

577


Mention what is select case statement?

548


How will you get the smallest subscript of an array in vbscript?

814


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

1444


Which function allows you to instantiate an object given its programmatic identifier or progid?

562


Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards

2263


Which object is used to work with the database in the vbscript language and what statement is used to create this object?

513


What is the output of a + b in vbscript if a = 5 and b = 10?

2123


Which operator can be used to do an xor operation in vbscript?

683