method to get maximum number from array elements
static int getMax ( int [ ] inputArray ) { int maxValue = inputArray [ 0 ] ; for ( int i = 1 ; i < inputArray . Length ; i ++ ) { if ( inputArray [ i ] > maxValue ) { maxValue = inputArray [ i ] ; } } return maxValue ; }