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

what r the executing modes in QTP

2 Answers  


What’s the basic concept of QTP?

1 Answers  


Hai Friends this is Rajesh , Is there any Site or Blog that Video tutorials of Qtp that can be free downloadable to Pc. Friends if any body know that site or blog please send me because i'm really in need for that because i cannot affordMoney in learning Course in Institutes due to Financial Problem . So please Forward that Site or Blog which provides Downloadable Video Tutorials in Free to PC , As My Friend is having PC thru that I'm planning to learn. So Kindly help me Friends if you are aware of that Site/Blog

2 Answers  


In QTP I have a parameter in a datatable that is a sentence. I need to take the last word from the sentence and enter it into a field in a web application. How can I setup a parameter to enter in just a portion of the parameter (last word of the sentence) instead of the entire paramater (whole sentence).

2 Answers  


you are recording on "WINDOW 1", say it has a link if you click on that, that leads you to "WINDOW 2". If you do any manipulations on "WINDOW 2" that are automatically updated in to "WINDOW 1". But "WINDOW 1" is currently invisible. But the updations in "WINDOW 1" must also be recorded as a script in QTP. The best Example is if you update your resume in JOB STREET portal it actually happens in other window, but the previous window is automatically updated. Now does QTP help you in this types of situations? Any body can answer this question. please..... Siva

0 Answers   Covansys,


Is there is any method how to connect remote desk throw QTP if yes please answer with a example?

3 Answers   HP,


how i will connect oracle or microsoft acess database through manually written Script

2 Answers   Aurigo,


What is QuickTest Automation Object Model? Where we can use AOM?

1 Answers  


How to load the object repository at run time?

9 Answers   TCS,


when you press a link it displays "the page cannot be displayed" then as a tester how you will find the problem,what type of problem must be it?

3 Answers  


What is the file extension of the code file & object repository file in QTP?

2 Answers  


In QTP, As a first step wht we will do before going to start a Automation....when it will be decided that we have to go for a Automatio..and who will decide to go for Automation. Any body can pls let me know.. Thanks in Advance..

1 Answers   Wipro,


Categories