write a vb script to display the number is odd or even and
whether it is divisible by 9 or not

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is inner join? what is outer join? what is a constraint? tell me about rdbms? tell me about acid properties?

1436


what is the use of QCUtil? explain with one example?

6326


Hi All, I am facing one problem in QTP. There is link object in my application that exist in the Frame in mozilla firefox. Click event on that object is not working but once the frame is enabled/activated then click event works fine.But the frame does not have the activate property. This problem is coming in firefox only. Regards

2264


What are the uses of vb script?

587


How to write VB script for login module?

2678






Explain the adodb.stream class?

549


Which function allows you to instantiate an object given its programmatic identifier or progid?

562


write a function to read the items from combobox of Flight reservation & save in excel (QTP)??

2398


what do you mean .ota mobile format

1949


Explain different types of segment?

573


What is the purpose of on error resume next statement?

579


If a calulator having 3 buttons (of any number)in 3 of them one is not working properly due to which answer is wrong always. write a script to find out which button is not working properly ?

1564


Which data type/types are supported by vbscript language and what are their specialties?

598


1.I want to establish connection with excel and also want to fetch the data using SQL queries. 2.the code should be written in such a way that in future if I want to migrate from excel to MS excess database , then there should be minimal changes.

1523


Why is the use of exit do or exit for statements within loops discouraged?

569