galinyotsev123

ProgBasicsExam11and12August2018-E06uniquePINCodes

Jan 2nd, 2019
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. mport java.util.Scanner;
  2.  
  3. public class E06uniquePINCodes {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6.  
  7. int n1 = Integer.parseInt(scanner.nextLine());
  8. int n2 = Integer.parseInt(scanner.nextLine());
  9. int n3 = Integer.parseInt(scanner.nextLine());
  10.  
  11. for (int i = 1; i <= n1; i++) {
  12. for (int j = 1; j <= n2; j++) {
  13. for (int k = 1; k <= n3; k++) {
  14. if (i % 2 == 0 && k % 2 == 0) {
  15. if (j == 2 || j == 3 || j == 5 || j == 7) {
  16. System.out.println(i + " " + j + " " + k);
  17. }
  18.  
  19. }
  20. }
  21.  
  22. }
  23. }
  24. }
  25. }
Add Comment
Please, Sign In to add comment