Driver Code
$ n = 16 ; $ pos = findPosition ( $ n ) ; if ( ( $ pos == -1 ) == true ) echo " n = " , ▁ $ n , ▁ " , " , STRNEWLINE " Invalid number " , ▁ " " ; STRNEWLINE else STRNEWLINE echo ▁ " n = " , ▁ $ n , ▁ " , " , STRNEWLINE " Position " , ▁ $ pos , ▁ " " $ n = 12 ; $ pos = findPosition ( $ n ) ; if ( ( $ pos == -1 ) == true ) echo " n = " , ▁ $ n , ▁ " , " , STRNEWLINE " Invalid number " , ▁ " " ; STRNEWLINE else STRNEWLINE echo ▁ " n = " , ▁ $ n , ▁ " , " , STRNEWLINE " Position " , ▁ $ pos , ▁ " " $ n = 128 ; $ pos = findPosition ( $ n ) ; if ( ( $ pos == -1 ) == true ) echo " n = " , ▁ $ n , ▁ " , " , STRNEWLINE " Invalid number " , ▁ " " ; STRNEWLINE else STRNEWLINE echo ▁ " n = " , ▁ $ n , ▁ " , " , STRNEWLINE " Position " , ▁ $ pos , ▁ " " ? >