write a vb script to display the number is odd or even and
whether it is divisible by 9 or not
Answers were Sorted based on User's Feedback
Answer / mudaseer
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 ? | 16 Yes | 3 No |
Answer / 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 |
how to find the textfile in the folder and copy file from one folder to another folder useing parameterigation in QTP
How will you convert a given number to long in vbscript?
What methods are used to create text files and open text files in the vbscript language?
write a vb-script code to delete all the mails in my gmail in the year 2011
How do you declare a variable in vbscript?
how do you make the variable declaration mandatory?what is the use of "option explicit"?
When does ‘on click of button’ event gets triggered in the vbscript language?
Which object provide information about a single runtime error in a vbscript?
The function template cocept is implemented in vb.net is ???
What is the difference between ByRef and ByVal. When to use ByRef and ByVal
pls tell me which is good book or site for vbscript?
How to add actions in driver script to run those actions in QTP?