Friday, May 6, 2011

Sample Code for conditional statements

'Sample Code for conditional statements

a=10
b=20

If a<b Then
    reporter.ReportEvent micPass,"Condition Check","A is less than B"
Else
     reporter.ReportEvent micFail,"Condition Check","B is less than A"   
End If


d=0

For i= 1 to 10
    d = cint(d)+cint(i)
Next

msgbox d


a=0
j=0

While A <=10
    j= cint(j)+ A
    A = cint(a)+1
Wend

msgbox j

No comments:

Post a Comment