Number expressed as sum of five consecutive integers | function to check if a number can be expressed as sum of five consecutive integers . ; if n is multiple of 5 ; else print " - 1" . ; Driver Code
< ? php function checksum ( $ n ) { if ( $ n % 5 == 0 ) echo $ n / 5 - 2 , " ▁ " , $ n / 5 - 1 , " ▁ " , $ n / 5 , " ▁ " , $ n / 5 + 1 , " ▁ " , $ n / 5 + 2 ; else echo " - 1" ; } $ n = 15 ; checksum ( $ n ) ; ? >