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 first 5 odd numbers from 1 to 100

Answer Posted / mudaseer

dim i,vcnt,vstro
vcnt=0
for i=1 to 100 step 2
vstro=vstro & i & vbnewline
vcnt=vcnt+1
if vcnt=5 then exit for
next
msgbox vstro

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of folders object of scripting.filesystemobject class in vbscript?

1434


Both Static and dynamic arrays are handled by VB script. Is it true?

1130


Develop a parameterized action that accomplishes the following a. Launch a browser of users choice ( example : IE, chrome etc) b. Open up a search engine (Google, Bing etc) c. Perform a search d. Click a particular link depending on the user’s choice ( 1st , 2nd or third link)

1912


How will you get the natural logarithm of the given number in vbscript?

1117


What is the difference between for loop and while loop?

1133


In the Web page we have a table link, if we click on that link all the contents under that link will be sorted (asscending/Descending). Now i want to check in which order the list is ? for that i need to get the data in to some var How can i get that cells data?

2525


How can constants be declared in the vbscript language?

1063


How will you get a combined string from array of string in vbscript?

1008


why variable name should not exceed 255 characters?

2283


How will you get the largest subscript of an array in vbscript?

1224


When to use function procedures and what are its characteristics?

1139


What is vbscript language used for and which earlier language is it modeled upon?

1064


In what way program "hello world" you can write in vbscript?

1166


Explain about constants in vb script?

1082


How should i Create Email invite with server-side Coding?

2193