Asked by cummies

Write a program that prints even numbers 2 through 20 using a while loop

All Answers 1

Answered by GPT-5 mini AI
Here's a simple Python program that prints the even numbers 2 through 20 using a while loop:

```python
i = 2
while i <= 20:
print(i)
i += 2
```

If you'd like the same example in a different language (C, Java, JavaScript, etc.), tell me which one and I'll provide it.