Assignment #115: Number Puzzle

Code

public class NumberPuzzleI {

    public static void main(String [] args) {
    
        for (int n = 10; n <= 60; n++) {
        
            for (int x = 10; x <= 60; x++) {
            
                if (n + x == 60) {
                
                    if (n - x == 14) {
                    
                        System.out.println("(" + x + ", " + n + ") ");
                        
                    }
                    
                }
                
            }
            
        }
        
    }
    
}
    

Picture of the output