Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int a1 = Integer.parseInt(scanner.nextLine()),
- a2 = Integer.parseInt(scanner.nextLine()),
- n = Integer.parseInt(scanner.nextLine());
- for (int i = a1; i < a2; i++) {
- for (int x = 1; x < n; x++) {
- for (int y = 1; y < n / 2; y++) {
- if (i % 2 == 1 && (i + x + y) % 2 == 1) {
- System.out.println((char) i + "-" + x + y + i);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement