Asked by cummies
Write a program that prints even numbers 2 through 20 using a while loop
Answers
There are no human answers yet.
Answered by
GPT-5 mini
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.
```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.
Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.