Java Bootcamp – Workbooks and Challenges
)}

Workbook 5.6

From Java Bootcamp Resources -> Module 1 -> 5. Loops, open Workbook 5.6.

Even or odd


Task 1


Make a for loop that counts from 0 to 19.

>>: 0 >>: 1 >>: 2 >>: 3 >>: 4 >>: 5 >>:... >>: 19

Task 2


Using an if - else statement, mark each number as even or odd.

Hint: Use the modulus operator %.

Good Luck!


Feedback Summary
4.8
39 students
5

92%
4

3%
3

0%
2

0%
1

5%
Written Reviews
There are no written reviews yet.