Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package ForLoop2;
- import java.util.Scanner;
- public class PINCodes {
- public static void main(String[] args) {
- Scanner s = new Scanner(System.in);
- int a = Integer.parseInt(s.nextLine());
- int b = Integer.parseInt(s.nextLine());
- int c = Integer.parseInt(s.nextLine());
- for (int first = 1; first <= a; first++) {
- if (first % 2 != 0){
- continue;
- }
- for (int second = 1; second <= b; second++) {
- if (second != 2 && second != 3 && second !=5 && second != 7){
- continue;
- }
- for (int third = 1; third <= c; third++) {
- if (third % 2 != 0) {
- continue;
- }
- System.out.printf("%d %d %d%n", first, second, third);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement