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
function SquareCube ( N ) { let cnt = 0 , i = 1 ; while ( Math . floor ( Math . pow ( i , 6 ) ) <= N ) { ++ cnt ; ++ i ; } return cnt ; } let N = 100000 ; document . write ( SquareCube ( N ) ) ;