Function to calculate product of digits between given indexes
int digitProduct ( int digits [ ] , int start , int end ) { int pro = 1 ; for ( int i = start ; i <= end ; i ++ ) { pro *= digits [ i ] ; } return pro ; }