Advertisement
Guest User

Untitled

a guest
Nov 15th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. import java.util.*;
  2.  
  3. public class URI1133 {
  4.  
  5. public void run() {
  6. Scanner in = new Scanner(System.in);
  7. int x;
  8. int y;
  9.  
  10. x = Integer.parseInt(in.nextLine());
  11. y = Integer.parseInt(in.nextLine());
  12.  
  13. if (x > y) {
  14. int auxiliar = x;
  15. x = y;
  16. y = auxiliar;
  17. }
  18.  
  19. for (int i = x; i < y; i++) {
  20.  
  21. if (i % 5 == 2 || i % 5 == 3) {
  22. System.out.format("%d%n", i);
  23. }
  24. }
  25. }
  26.  
  27. public static void main(String[] args) {
  28. new URI1133().run();
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement