Advertisement
Guest User

Untitled

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