write a vb script to display the number is odd or even and
whether it is divisible by 9 or not

Answer Posted / alok

vnum=cint(inputbox("enter a number"))
if vnum=0 then
msgbox "invalid"
end if
if vnum mod 2=0 then
msgbox "even"

else msgbox "odd"
end if
if vnum mod 9=0 then
msgbox "num is divisible by 9"
else
msgbox "num is not divisible by 9"
end if

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does VB/Win make standalone .EXE files?

2903


What purpose does ‘on error resume next’ serves?

551


How to throw an error in vbscript?

605


Write a test case using Test if the images,a particular test exists,check if the page links match,page response is within a certain range,parameterization of the test,the test should comprise of actions,the test should use a custom function,the test should use global repository

1794


Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com

1045






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

556


How to open a file. What is the perpose of true and false mode there?

611


How to get the length of the string by making use of the string function?

569


Is vbscript language a case-sensitive language and what does it mean?

547


Explain about filter expression?

565


What is vbscript language used for and which earlier language is it modeled upon?

535


What are the differences between sub procedures and function procedures?

520


What is the use of the date function in the vbscript language?

567


Explain the operator precedence in vb script?

656


Description.Create

2162