Number of elements with even factors in the given range | Function to count the perfect squares ; Driver code
< ? php function countOddSquares ( $ n , $ m ) { return ( int ) pow ( $ m , 0.5 ) - ( int ) pow ( $ n - 1 , 0.5 ) ; } $ n = 5 ; $ m = 100 ; echo " Count ▁ is ▁ " , ( $ m - $ n + 1 ) - countOddSquares ( $ n , $ m ) ; ? >