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 |
Mention when to use function procedures and what are its characteristics?
Hi, Anybody could tell me What is the script for Reverse of Given number. Ex:236--632. Thanks in Advance..
write a vb script to display the number is odd or even and whether it is divisible by 9 or not
How to access array data?
What are the valid scopes of a variable in vbscript?
Which in-built function related to an array joins substrings into one string in the vbscript language?
What are the data types supported by vbscript?
Is VB Script Case sensitive or Case insensitive?
what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?
Check whether given Number is Even or Odd?
Explain the string concatenation function in vbscript?
Illustrate briefly about the different types of statement