'11) write a program to print even numbers starting from 2 to 20
For i=2 To 20 Step 2
WScript.Echo i
Next
' or you can also write another logic
For i=2 To 20 Step 1
If (i Mod 2)=0 Then
WScript.Echo i
End If
Next
For i=2 To 20 Step 2
WScript.Echo i
Next
' or you can also write another logic
For i=2 To 20 Step 1
If (i Mod 2)=0 Then
WScript.Echo i
End If
Next
No comments:
Post a Comment