Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package uri1001;
- import java.util.*;
- public class Uri1001 {
- public void run() {
- Scanner in = new Scanner(System.in);
- int X;
- int Y;
- X = Integer.parseInt(in.nextLine());
- Y = Integer.parseInt(in.nextLine());
- if (X > Y) {
- int auxiliar = X;
- X = Y;
- Y = auxiliar;
- }
- for (int i = X; i < Y; i++) {
- if (i % 5 == 3 || i % 5 == 2) {
- System.out.println(i);
- }
- }
- }
- public static void main(String[] args) {
- new Uri1001().run();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement