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

filter the array values without using filter function?

0 Answers   CSS Corp, WQED,


How will you trim the spaces on the left of a string using vbscript?

1 Answers  


Mention what is variant in vbscript?

0 Answers  


Hello Friends , I am the new joinner of this website. I am working with Sapient ,Gurgoan I would like to ask few qurries regarding the QTP Tool of (Testing) Currently working on QTP Tool . I would like to no learn VB Script can u name some Books which i get in market. And a small issue in QTP I had 2 users right i have to login and send the document from this user to second user right. when i am send this doc some contendId number generates right. now i am loging into second user and i have to search for that contentId right i found it now i dont want to accept the document so i had an opption of check out ok i have to click on check out my QTP Code is like this Browser(" ").Page(" ").WebTable(" ").ChildItem (3,5,"Image",0).click Browser(" ").Page(" ").Link("ChecK Out").Click i new this code is perfectly right but when i am run the script i have to click on that particular contentId and click on check out but now the Problem is started the error is the document has been already checked out remeber every time my content id changes means it is the new contentId which is not been used atleast once Please help me out in this issue i am in big trouble

0 Answers   GCE, Sapient,


Find Out Length of an array without using Ubound?

1 Answers  


how to operate webobjects in a webpage using getobject function and then using generic methods?

0 Answers  


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

0 Answers  


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

0 Answers  


Write a program to print all lines that contains a word either “testing” or “qtp”

2 Answers  


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

0 Answers  


Which operator is used for fetching the modulus of the 2 numbers in the vbscript language?

0 Answers  


Hi anyone Can Send Solution to the Question wt m posting now Prepare Script for the Bellow Scenario? Login to Gmail Page Open Inbox check Mails save them in a Folder

0 Answers   IBM,


Categories