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

Answers were Sorted based on User's Feedback



write a vb script to display first 5 odd numbers from 1 to 100 ..

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

write a vb script to display first 5 odd numbers from 1 to 100 ..

Answer / eswar

cnt =0
For i=1 to 100
If (i mod 2 <> 0) Then
MsgBox i
cnt=cnt+1
End If
If cnt=5 Then
Exit for
End If

Next

Is This Answer Correct ?    7 Yes 3 No

write a vb script to display first 5 odd numbers from 1 to 100 ..

Answer / anjali tamrakar

Private sub form_load()
Dim a as integer
Dim b as integer
B=0
For A=1 to 100 step2
B=B+A
Print A,B
Next A
End sub

Is This Answer Correct ?    5 Yes 3 No

write a vb script to display first 5 odd numbers from 1 to 100 ..

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

More VB Script Interview Questions

What are the special sub-types in vbscript?

0 Answers  


Hello Guys, If any body looking for "worksoft certify tool training in bangalore", please contact me aimansaud@gmail.com

0 Answers  


write a program to display configuration of a local system with the help of vb script.

0 Answers  


How many data types are supported in Vbscript?

3 Answers   Microsoft,


this q asked in applabs, q is: QTP should open google.com page and enter "qtp" in one edit(search) box and click search and should open google.com again and enter "job" in edit(search) box and click on search. I tried this but getting error "Edit(search) box matches more than one object", could anyone this question plz..

1 Answers   AppLabs,


What is string concatenation function in VBScript?

2 Answers  


In our application qtp unable to indentify the menu items,we tried number of times to add objetcs into object repository but fail. through normal recording mode only objects going to add into repository but while running same recording script qtp showing a error like " unable to indentify the object". in repository there is no any properties and pro values for that object and also i tried with virtual object config also unable to find the object in application and in repository. Then what i have to do to identify menu objects????? can anybody hell me pls..............

2 Answers   Blue Star,


How to Import data from a file (file is on the desktop) to the data table

2 Answers   IBM,


Which object is used to work with the database in the vbscript language and what statement is used to create this object?

0 Answers  


Mention what is vbscript procedures?

0 Answers  


How to pass argument by reference to a function in vbscript?

0 Answers  


How to check the particular window is exist or not with out using check points

2 Answers  


Categories