Multiples of 3 or 7 | Returns count of all numbers smaller than or equal to n and multiples of 3 or 7 or both ; Driver code
< ? php function countMultiples ( $ n ) { return floor ( $ n / 3 + $ n / 7 - $ n / 21 ) ; } echo " Count = " ? >