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
Why to use option explicit in vb script?
Which constant is used for print and display functions and works as same as pressing enter key?
Dear All, I am geting below IE error whilie executing the QTP scripts in Batch mode "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience." can any one suggest me how to resolve this issue . Thanks Balaji
What are subprocedures in vbscript?
Hello friends..... Can any give the methods for Ms-Access, and Mozilla firefox in Automation Object Model in QTP. Please give me currect answers... if you do not understand my question please don't give answers. Thanking you.
Which command is used for writing text on a page?
wht must be the interview question on corinthian information technology solutions incorporated.
how to answer "TELL ME ABOUT UR SELF" as exp.person. whr to start and whr to stop. can anyone tel me
What are string functions in vbscript?
how to comvert 120 into one hunderd twenty rupees only and vice varsa
How to create a function in vbscript?
What are the 2 ways in which a variable can be declared in the vbscript language?
Explain what is loose binding? Why is it not a good practice to use it?
Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards
How will you convert a string to upper case string using vbscript?