WindFell

Unique PIN Codes Java

Sep 11th, 2018
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.86 KB | None | 0 0
  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;
  4.  
  5. public class UniquePINCodes {
  6.     public static void main(String[] args) throws IOException {
  7.         BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
  8.         int n1 = Integer.parseInt(reader.readLine());
  9.         int n2 = Integer.parseInt(reader.readLine());
  10.         int n3 = Integer.parseInt(reader.readLine());
  11.  
  12.         for (int i = 1; i <= n1; i++) {
  13.             for (int j = 1; j <= n2; j++) {
  14.                 for (int k = 1; k <= n3; k++) {
  15.                     if (i % 2 == 0 && k % 2 == 0) {
  16.                         if (j == 2 || j == 3 || j == 5 || j == 7) {
  17.                             System.out.println(i + " " + j + " " + k);
  18.                         }
  19.  
  20.                     }
  21.                 }
  22.  
  23.             }
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment