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 |
How do I check that the names in a weblist are correct e.g in flight application the names of item are Denver, paris,London, etc. How do I ensure the correct item is displayed from the list after doing item count ?
Could Anybody tell me the Script for REVERSE an Interger int reverse(int num) Ex:246 to 642.. Thanks in Advance.
Which is the default Data types in VBScript?
Can anybody code this problem for me in VB script - Create an array of 4 elements, increase its size to 7 elements and then find out which of the elements are prime (use functions)
Mention what is the main difference between function and sub-procedure?
what is the function to get the ascii value of the character?
Inorder to avoid Message box while writing script which alternative method can be used?
Can automation testing find ssame no. of bugs what we can find by manual testing?
How can you have different number of cells for each row of a table in HTML?
If we take 2 strings as “good” and “bad” then what will ‘+’ and ‘&’ operators return?
How will you trim the spaces on the left of a string using vbscript?
please can you help me to get a code of flames using a visual basic 6