Program to print factors of a number in pairs | Javascript program to print prime factors in pairs . ; Driver code
function printPFsInPairs ( n ) { for ( let i = 1 ; i * i <= n ; i ++ ) if ( n % i == 0 ) document . write ( i + " " + parseInt ( n / i ) + " " ) ; } let n = 24 ; printPFsInPairs ( n ) ;