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
what is resorceallocation
Mention when to use function procedures and what are its characteristics?
please can you help me to get a code of flames using a visual basic 6
What is the scope of a constant declared using public?
Explain about vb script?
Mention what is the use of option explicit in vbscript?
why do u choose to go for testing why cant for devoloping
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?
How will you get the exponent of the given number in vbscript?
Explain a few date functions in vbscript
Write a code to print numbers from 5 to 0?
if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.
HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.
Explain How do you create a recordset object in vbscript?
What are the differences between sub procedures and function procedures?