Count numbers upto N which are both perfect square and perfect cube | Function to return required count ; Driver Code ; function call to print required answer
< ? php function SquareCube ( $ N ) { $ cnt = 0 ; $ i = 1 ; while ( ( pow ( $ i , 6 ) ) <= $ N ) { ++ $ cnt ; ++ $ i ; } return $ cnt ; } $ N = 100000 ; echo SquareCube ( $ N ) ; ? >