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

Is the provision for integrating QTP with QC ,available from the version 9.0 onwards only or even 8.2 version has such provisions?

1 Answers  


how can i count the number of links???

2 Answers  


how to display message with out using msgbox function?

5 Answers   AppLabs,


How can you handle exceptions in qtp?

0 Answers  


What is the entry criteria and exit criteria for your test automation

2 Answers   HP, Virtusa,






Synchronozation types in QTP

11 Answers  


HI, Anybody can explain Automation Test Framework...and wht do we do before start of Automation.....

5 Answers   Polaris, Siemens,


How to create frame work for qtp?

1 Answers   Bank Of America, Polaris,


How can i test an application like Google Earth.In my application data will be fetched from a oracle database based upon which graphs are generated..so these all are dynamic..how can i use qtp here..alongwith that how can i test the map generated by a satellite just like google earth..

0 Answers  


Hi,How to write regular expression for inbox(10) {here 10 is changing while playback}.tell me the pettern.

6 Answers  


In qtp, how you can use xpath to identify objects?

0 Answers  


Waht is diff between SystemUtil.Run and invokeapplication

5 Answers  


Categories