Driver Code
var n = 16 ; var pos = findPosition ( n ) ; if ( pos == - 1 ) document . write ( " " + n + " " ) ; else document . write ( " " + n + " " + pos ) ; document . write ( " " ) ; n = 12 ; pos = findPosition ( n ) ; if ( pos == - 1 ) document . write ( " " + n + " " ) ; else document . write ( " " + n + " " , pos ) ; document . write ( " " ) ; n = 128 ; pos = findPosition ( n ) ; if ( pos == - 1 ) document . write ( " " + n + " " ) ; else document . write ( " " + n + " " + pos ) ;