Pair of integers with difference K having an element as the K | Function to find the required pair ; No pair possible ; Driver Code
function computePair ( K ) { if ( K == 1 ) { document . write ( " " ) ; return ; } else { document . write ( K * K / ( K - 1 ) + " " ) ; document . write ( K / ( K - 1 ) ) ; } } var K = 6 ; computePair ( K ) ;