Assignemnt #115, Number Puzzles Ir

Code

    public class NumberPuzzle {
    
        public static void main(String[] args) {
        
            for (int x = 1; x <= 60; x++) {
            
                for (int n = 1; n <= 60; n++) {
                
                    if ((x + n == 60) && ((x - n == 14) || (n - x == 14))) 
                        System.out.println(x + " and " + n);
                }
            }
        }
    }


    

Picture of the output

Assignment 115