Non | Function to print all pairs whose sum of Bitwise OR and AND is N ; Iterate from i = 0 to N ; Print pairs ( i , N - i ) ; Driver Code
function findPairs ( N ) { for ( let i = 0 ; i <= N ; i ++ ) { document . write ( " " + i + " " + ( N - i ) + " " ) ; } } let N = 5 ; findPairs ( N ) ;