Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package exam;
- import java.util.Scanner;
- public class santa {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int n = Integer.parseInt(scanner.nextLine());
- int m = Integer.parseInt(scanner.nextLine());
- int s = Integer.parseInt(scanner.nextLine());
- for (int i = m; i > n; i--) {
- if (i % 3 == 0 && i % 2 == 0) {
- if (i != s) {
- System.out.printf("%d ", i);
- } else {
- break;
- }
- }
- }
- }
- }
- RAW Paste Data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement