write a vb script to print even numbers from 1-50?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
How to insert a check point to a image to check enable property in QTP?
what does it mean when a check point is in red color? what do u do?
What is Distributed testing? How does UFT support it?
Explain different types of action in qtp?
What is the basic concept of quicktest professional?
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 ?
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
Can I record on netscape browser does it require any special settings ?
What is chaild object method? When we will go for chaild object method? How to use chaild object method?
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.
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)
How to execute a VBS file without using Execute File statement?