006-005-003
Continue Statement: Display Even Numbers Only
Easy
Problem Description
Continue Statement: Display Even Numbers Only
Learning Objective: Skip part of loop with continue statement
In this problem, you will create a program that uses the continue statement to skip odd numbers and extract only even numbers from an input sequence, displaying them to standard output.
Create program that inputs number sequence and displays only even numbers. Use continue statement to skip displaying odd numbers.
Input
Line 1: Number count (integer)
Line 2 onwards: Numbers (integer, multiple lines)
Output
[even1]
[even2]
...
```java
(display only even numbers).
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up