Represent the given number as the sum of two composite numbers | Java implementation of the approach ; Function to find two composite numbers which when added give sum as n ; Only 8 and 10 can be represented as the sum of two composite integers ; If n is even ; If n is odd ; Driver code
class GFG { static void findNums ( int n ) { if ( n <= 11 ) { if ( n == 8 ) System . out . print ( "4 ▁ 4" ) ; if ( n == 10 ) System . out . print ( "4 ▁ 6" ) ; else System . out . print ( " - 1" ) ; return ; } if ( n % 2 == 0 ) System . out . print ( "4 ▁ " + ( n - 4 ) ) ; else System . out . print ( "9 ▁ " + ( n - 9 ) ) ; } public static void main ( String args [ ] ) { int n = 13 ; findNums ( n ) ; } }