Number of elements with even factors in the given range | Function to count the perfect squares ; Driver code
function countOddSquares ( n , m ) { return Math . pow ( m , 0.5 ) - Math . pow ( n - 1 , 0.5 ) ; } var n = 5 , m = 100 ; document . write ( " " + ( ( m - n + 1 ) - countOddSquares ( n , m ) ) ) ;