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 to acces the remote mechine using vb cript(QTP)
Mention what is the use of option explicit in vbscript?
Which data type/types are supported by vbscript language and what are their specialties?
How can you fetch the value of a cookie?
What is the extension of the vbscript file?
How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...
Does VB/Win make standalone .EXE files?
what is the features of visual basic?
hi what is called GUI in QTP 8.2 and how can we test the apllication using GUI?
How regexp.execute method works?
How to write functions and sub in vb script?
When does ‘on click of button’ event gets triggered in the vbscript language?
Why is it recommended to close the database connection every time after the work is completed?
How should i Create Email invite with server-side Coding?
Mention if qtp generates vbscript code as we record actions, can't it possible to directly write using vbscript code when qtp does the same thing too?