All possible co | Function to count possible pairs ; total count of numbers in range ; printing count of pairs ; Driver code
< ? php function CountPair ( $ L , $ R ) { $ x = ( $ R - $ L + 1 ) ; echo $ x / 2 , " STRNEWLINE " ; } $ L = 1 ; $ R = 8 ; CountPair ( $ L , $ R ) ; ? >