Write a program to print all even numbers from 1 to 15 (Using While-Wend).
Answers
Answered by
4
Answer:
CLS
I=1
WHILE I<=15
IF I MOD 2==0 THEN
PRINT I
I=I+1
WEND
END
Logic:-
- Initialise I=1
- Run a while loop with condition I<=15
- Check if I is divisible by 2 or not if yes, display I's value
- Increase the value of I by 1
- Close the program
Similar questions