Driver program to test above function
var n = 0 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 ) document . write ( " " )