Count numbers which can be represented as sum of same parity primes | Function to calculate count ; Driver Code
< ? php function calculate ( & $ array , $ size ) { $ count = 0 ; for ( $ i = 0 ; $ i < $ size ; $ i ++ ) if ( $ array [ $ i ] % 2 == 0 && $ array [ $ i ] != 0 && $ array [ $ i ] != 2 ) $ count ++ ; return $ count ; } $ a = array ( 1 , 3 , 4 , 6 ) ; $ size = sizeof ( $ a ) ; echo calculate ( $ a , $ size ) ; ? >