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 to write function to validate the number of characters entering into the text box?
Could Anybody tell me the VBscript for REVERSE an Integer int reverse(int num) Ex:246 to 642
How to find arry size in qtp vb script
Suppose by navigation I went from 1 st page to 5 page ,so Write a generic script for coming from any page to the 1st page and by executing where the page may be it will come to 1st page
Why to add checkpoint in QTP What's the purpose of checkpoints & how to add it
hai all.iam chandu..please let me know how to test a link in QTP when it is changing at run time..and what property we should take while we r using descriptive programming for a link..
write a vb script to open a text file and write into it
Mention what is the main difference between function and sub-procedure?
How are arrays declared in the vbscript language?
What is vbscript procedures?
Explain the extension .hta?
What are the different types of operators and their order of precedence?