Advertisement
Andreeva-Magdalena97

PINCodes

Mar 25th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.91 KB | None | 0 0
  1. package ForLoop2;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class PINCodes {
  6.     public static void main(String[] args) {
  7.         Scanner s = new Scanner(System.in);
  8.         int a = Integer.parseInt(s.nextLine());
  9.         int b = Integer.parseInt(s.nextLine());
  10.         int c = Integer.parseInt(s.nextLine());
  11.  
  12.         for (int first = 1; first <= a; first++) {
  13.             if (first % 2 != 0){
  14.                 continue;
  15.             }
  16.             for (int second = 1; second <= b; second++) {
  17.                 if (second != 2 && second != 3 && second !=5 && second != 7){
  18.                     continue;
  19.                 }
  20.                 for (int third = 1; third <= c; third++) {
  21.                     if (third % 2 != 0) {
  22.                         continue;
  23.                     }
  24.  
  25.                     System.out.printf("%d %d %d%n", first, second, third);
  26.  
  27.                 }
  28.  
  29.             }
  30.         }
  31.  
  32.     }
  33.  
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement