Number of perfect squares between two given numbers | Method to count square between a and b ; Driver code
< ? php function countSquares ( $ a , $ b ) { return ( floor ( sqrt ( $ b ) ) - ceil ( sqrt ( $ a ) ) + 1 ) ; } { $ a = 9 ; $ b = 25 ; echo " Count ▁ of ▁ squares ▁ is ▁ " , countSquares ( $ a , $ b ) ; return 0 ; } ? >