'12) write a program to print odd numbers starting from 1 to 20
For i=1 To 20 Step 2
WScript.Echo i
Next
' or you can also write this logic
For i=1 To 20 Step 2
If (i Mod 2) <>0 then
WScript.Echo i
End If
Next
For i=1 To 20 Step 2
WScript.Echo i
Next
' or you can also write this logic
For i=1 To 20 Step 2
If (i Mod 2) <>0 then
WScript.Echo i
End If
Next
No comments:
Post a Comment