January 7, 2020

WAP to display all the odd numbers from 1 to 10

(using FOR - NEXT)
CLS
FOR I = 1 TO 10 STEP 2
PRINT I;
NEXT I
END

(using WHILE - WEND)
CLS
I = 1
WHILE I <= 10
PRINT I;
I = I + 2
WEND
END


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.