Advertisement
Ligh7_of_H3av3n

06. Unique PIN Codes

Oct 15th, 2023
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. package SamiqtIzpit;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P06 {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int first = scanner.nextInt();
  10.         int second = scanner.nextInt();
  11.         int third = scanner.nextInt();
  12.  
  13.         for (int i = 2; i <= first; i += 2) {
  14.             for (int j = 2; j <= second; j++) {
  15.                 for (int k = 2; k <= third; k += 2) {
  16.                     if (j == 2 || j == 3 || j == 5 || j == 7) {
  17.                         System.out.println(i + " " + j + " " + k);
  18.                     }
  19.                 }
  20.             }
  21.         }
  22.     }
  23. }
  24.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement