Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Lesson_17_Activity_Two {
- public static void main(String[] args) {
- System.out.println("Enter two numbers:");
- Scanner scanner = new Scanner(System.in);
- int first = scanner.nextInt();
- int second = scanner.nextInt();
- for (int i=first; i<=second; i++) {
- if (i % 2 == 0) {
- System.out.print(i+" ");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement