Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class hgugd {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int a1 = Integer.parseInt(scanner.nextLine());
  8. int a2 = Integer.parseInt(scanner.nextLine());
  9. int num = Integer.parseInt(scanner.nextLine());
  10.  
  11.  
  12. int n = 0;
  13. for (int i = a1; i <= a2; i++) {
  14. n = i;
  15. for (int j = 1; j < num; j++) {
  16. for (int k = 1; k < num / 2; k++) {
  17. if (!(n % 2 == 0)) {
  18.  
  19. if (!((k + n + j) % 2 == 0)) {
  20.  
  21.  
  22. System.out.printf("%c%d%d%d%n", n, j, k, n);
  23. }
  24.  
  25. }
  26.  
  27. }
  28. }
  29. }
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement