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 |
What is the use of the date function in the vbscript language?
Write a program to create a Dynamic array of size 5 elements and display all the elements.
What aspects of vbscript make it safe so that a web page using vbscript cannot destroy or corrupt information on a user's computer?
how to set one column as primary key in QTP and fetch values accordingly
int a=4857 i need output as 7584.without using any inbuild function?
HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.
What are subprocedures in vbscript?
what is fire event method in qtp?
Explain about the support of asp for vb script functionality?
what is the function to get the ascii value of the character?
How can I write HTML text to the window in VB Script?
write a vb script to display calculator using case statement?