Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

HOw we can apply web service checkpoint in QTP 9.5? I tried it out with net connection also. But not getting success.

2497


Why is error handling required?

1015


Why to use option explicit in vb script?

1049


Explain sga memory structures?

1024


How will you compare two strings in vbscript?

1061


Mention what is the use of option explicit in vbscript?

970


Mention what is vbscript procedures?

995


Like OPTION EXPLICIT statement what are the other statements used in vbscript and their usage. Please post me all the statements please.

2101


How can constants be declared in the vbscript language?

987


How will you get the last occurrence of one string within another string using vbscript?

1189


Is VB Script Case sensitive or Case insensitive?

1094


how to comvert 120 into one hunderd twenty rupees only and vice varsa

2358


How to use QTP Object in .vbs(vbscript file) file Ex: Browser().., wait(), exist() and etc...

3437


What are keywords in the vbscript language?

1027


How will you get the octal value of the given number in vbscript?

950