write a vb script to print even numbers from 1-50?

Answers were Sorted based on User's Feedback



write a vb script to print even numbers from 1-50?..

Answer / pramila

Dim num
For i=2 to 50 step 2
print i
Next

Is This Answer Correct ?    82 Yes 37 No

write a vb script to print even numbers from 1-50?..

Answer / ravi

dim i
for i=1 t0 50
if (i mod 2=0) then
msgbox i&"is even number"
else
msgbox i&"is odd number"
end if
next

Is This Answer Correct ?    64 Yes 31 No

write a vb script to print even numbers from 1-50?..

Answer / smitha

for i = 1 to 50
if i mod 2 = 0 Then
evenStr = evenstr & i & " , "
end if
Next
MsgBox evenStr

Is This Answer Correct ?    33 Yes 19 No

write a vb script to print even numbers from 1-50?..

Answer / alam

Num i
for i =1 To20
if mod 2=0
print number is evevn
else
print number is not even
end sub

Is This Answer Correct ?    4 Yes 9 No

write a vb script to print even numbers from 1-50?..

Answer / nazir

dim i
for i = 1 to 50
if i mod 2 = 0 then
print i & ' is an even number"
else
print i & " is an odd number"
endif
next

Is This Answer Correct ?    10 Yes 17 No

write a vb script to print even numbers from 1-50?..

Answer / pradeep

For i=1 to i=50
if (i mod 2=0)then
messagebox i&"is even number"
else
messagebox i&"is odd number"
endif
next

Is This Answer Correct ?    23 Yes 36 No

Post New Answer

More QTP Interview Questions

Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?

1 Answers   Crea,


How to save your test using quicktest professional?

0 Answers  


Define Environment Variable in UFT and its uses?

0 Answers  


What is the extension of QTP local Repository? If it is .mtr then what is .bdb extension stands for?

0 Answers  


We have an application which generates links( more than thousand) based on the time stamp dynmically.Each link will download an xls file. we are supposed to click a particular link (which link to click will be obtained thru some buisiness logic).Now the issue is QTP is not recogniging the link(say Var1) though its properties showed mandatory fields text=xyz and html tag=A.I used following code to do this. Browser("ABC").Page("123").Link("text:=" &Var1,"html tag:=A").click, can any one suggest why this is not recognised by QTP though syntax is correct?(Is there any sync issue to be considered?Because on clicking the link it will take 5 mins to open that file)

3 Answers  






how can we test load time of an page in webtesting?

3 Answers   Ordain Solutions,


what is key word driven frame work ? why it is called like that ? what is the diference between keyword driven and data driven frame work ?

0 Answers  


what is meant by keyword driven frame work can any one answer plzzzzzzzzzzz

1 Answers  


To which environments does a QTP support?

1 Answers   Crea,


if my application shows 100 records and in my database having 200 records how i can validate using QTP tool?plz exp. in detail?

2 Answers   Wipro,


.have you ever written compiled module? if yes , tell me about some of the function that you wrote.

0 Answers   TCS,


In descriptive programming how we know the properties of the objects, if application is not developed and the prototype of the application is also not developed.

1 Answers  


Categories