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 / psri

dim a(50)
j=0
for i = 1 to 100

if (i mod 2) <> 0 then
a(j)=i
j=j+1
cnt=cnt+1
End if
next
msgbox "The odd no is "& join(a) &"The total no of odd no's
is"&cnt

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

regular expression that will recognize a browser as long as its name property starts with mybrowser

2241


How will you get a random number between 0 and 1 in vbscript?

1331


after medical test,when will be the police verification

2171


How are arrays declared in the vbscript language?

1005


How to scroll down a page while recording in qtp. suggest me any method apart from low level recording.

3027


What are the data types supported by vbscript?

1128


why variable name should not exceed 255 characters?

2236


Hi, Can anyone please send me vb script examples to practice vb and also material to learn vb scripting in QTP? my email id : hareen_11@yahoo.com

2314


Which in-built functions are used to convert the specified expression in the form of date and string in the vbscript language?

1015


What is the purpose of regexp object in vbscript?

1027


What is Procedure or Subroutine in VB Script?

1157


What are subprocedures in vbscript?

1111


I have an excel sheet with multiple ID's in a column. Now i need fetch those ID's in an application and check whether if it already exist in the DB. If not then i have to go with the process of inserting them in the DB. If it exists then i need to skip that ID and move to the next ID and check the same and proceed. How can i do that with for loop and if condition?

1402


Which respective symbols are used to separate a line and to break the lengthy statement into multiple statements in the vbscript language?

1304


What is the purpose of the err object in the vbscript language?

1111