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
Difference between dim,public and private variables in vb script?
What are the environments supported by vbscript language?
Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com
How will you reverse a string in vbscript?
What are the naming conventions while declaring a variable in the vbscript language?
What is the main difference between function and sub-procedure?
What are keywords in the vbscript language?
what do you mean .ota mobile format
Explain about tristate constants in vbscript?
how to check whether link is disabled in QTP??
Explain the asc function?
How are arrays declared in the vbscript language?
How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...
what is the difference between modular and data and keyword driven framework
Which operator can be used to change the value of the operand or change the state of the condition?