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
Explain what is loose binding? Why is it not a good practice to use it?
Mention the rules for using option explicit statement?
What are the uses of vb script?
Mention the environments where vbscript could be run?
How do you declare a variable in vbscript?
Mention how to assign a date value to a variable?
How will you get the largest subscript of an array in vbscript?
Which date function is used in the vbscript language to find the difference between the 2 dates?
What is the use of the formatdatetime function in the vbscript language?
How to delete a cookie using vbscript?
Mention how to create a cookie using vbscript?
How to make professional test report using vbscript code in UFT, which gives us complete analysis of the test.
Does VB/Win make standalone .EXE files?
Explain vbscript in detail?
What is difference between vbscript and vba?