write a vb script to display the number is odd or even and
whether it is divisible by 9 or not
Answer Posted / 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 |
Post New Answer View All Answers
can anyone tell me the procedure of interview held in applabs
How will you get the last occurrence of one string within another string using vbscript?
Explain about scrrun.dll in vbscript?
Which conditional statement is the most convenient one to use in the case of multiple conditions in the vbscript language?
Explain about tristate constants?
Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?
HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.
Explain the .wsf files?
How will you get the natural logarithm of the given number in vbscript?
What's the difference between vbscript and vb.net?
What are the properties of regexp object?
How will you convert a given number to long in vbscript?
How to Enter Values on the Command promt using VB script
Hello Friends , I am the new joinner of this website. I am working with Sapient ,Gurgoan I would like to ask few qurries regarding the QTP Tool of (Testing) Currently working on QTP Tool . I would like to no learn VB Script can u name some Books which i get in market. And a small issue in QTP I had 2 users right i have to login and send the document from this user to second user right. when i am send this doc some contendId number generates right. now i am loging into second user and i have to search for that contentId right i found it now i dont want to accept the document so i had an opption of check out ok i have to click on check out my QTP Code is like this Browser(" ").Page(" ").WebTable(" ").ChildItem (3,5,"Image",0).click Browser(" ").Page(" ").Link("ChecK Out").Click i new this code is perfectly right but when i am run the script i have to click on that particular contentId and click on check out but now the Problem is started the error is the document has been already checked out remeber every time my content id changes means it is the new contentId which is not been used atleast once Please help me out in this issue i am in big trouble
What are the differences between sub procedures and function procedures?