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 ?    66 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 ?    34 Yes 20 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 10 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

How to insert a check point to a image to check enable property in QTP?

1 Answers  


what does it mean when a check point is in red color? what do u do?

4 Answers  


What is Distributed testing? How does UFT support it?

0 Answers  


Explain different types of action in qtp?

0 Answers  


What is the basic concept of quicktest professional?

0 Answers  


When u r running a script , if u get a popup window that describing that u have received a mail to your outlook application. so to avoid the interference of the popup window , which recovery scenario(popup,object state,application hang,system crash) would u use ?

4 Answers   Accenture,


how to pass parameters from one action to another using output parameters I am not calling action 2 from action 1, they are being called individually I need syntax please .. Requirement: Action 1 customer = Browser(" ").Page(" ").Link(" ").GetROProperty("value") I want to use the value stored in customer in Action 2 I do not want to use any of these actions as re-usable actions

2 Answers  


Can I record on netscape browser does it require any special settings ?

2 Answers  


What is chaild object method? When we will go for chaild object method? How to use chaild object method?

2 Answers  


Can you write a script for to insert array elements in an excel A to Z columns only. if the number oe elements in the array is greater than the number of columns (A to Z), come to next row and proceed furthur. eah cell should contain only one array value.

1 Answers  


How can we disable popup blocker? (I think it means when we get a pop up messge(its error) how we wil disable that one with out interrupting normal process)

5 Answers  


How to execute a VBS file without using Execute File statement?

3 Answers   iGate,


Categories