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
HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.
Why is error handling required?
Why to use option explicit in vb script?
Explain sga memory structures?
How will you compare two strings in vbscript?
Mention what is the use of option explicit in vbscript?
Mention what is vbscript procedures?
Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.
How can constants be declared in the vbscript language?
How will you get the last occurrence of one string within another string using vbscript?
Is VB Script Case sensitive or Case insensitive?
how to comvert 120 into one hunderd twenty rupees only and vice varsa
How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...
What are keywords in the vbscript language?
How will you get the octal value of the given number in vbscript?