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

What are the disadvantages of vbscript?

891


How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.

2819


What is the purpose of drive object of scripting.filesystemobject class in vbscript?

808


What are the 2 ways in which a variable can be declared in the vbscript language?

824


Mention the rules for using option explicit statement?

720


How to find the font in qtp. Scenario:After entering the username and passwd you will be navigate into the "welcome:Username" page.Now I want to extarct font for this message.

1954


Can automation testing find ssame no. of bugs what we can find by manual testing?

1756


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

732


please can you help me to get a code of flames using a visual basic 6

1458


Explain sga memory structures?

813


What are the naming conventions while declaring a variable in the vbscript language?

857


Explain the scope of the variables using dim, public, and private keywords respectively.

958


how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me

1587


Explain the support of asp for vb script functionality?

860


why variable name should not exceed 255 characters?

2020