Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package my_Programming_Basics_Test;
- import java.util.Scanner;
- public class Special_Combinations {
- public static void main(String[] args) {
- Scanner console = new Scanner(System.in);
- int firstNumber = Integer.parseInt(console.nextLine());
- int secondNumber = Integer.parseInt(console.nextLine());
- int thirdNumber = Integer.parseInt(console.nextLine());
- for (int i = 1; i <= firstNumber; i++) {
- for (int j = 1; j <= secondNumber; j++) {
- for (int k = 1; k <= thirdNumber; k++) {
- if(i % 2 == 0 && k % 2 == 0){
- if(j == 2 || j == 3 || j == 5 || j == 7){
- System.out.println(i + " " + j + " " + k);
- }
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment