Driver Code
static void Main ( ) { int num = 1 ; int [ ] arr = new int [ ] { 3 , 10 , 6 , 4 , 5 } ; int n = arr . Length ; int maxLimit = 15 ; Console . Write ( findMaxVal ( arr , n , num , maxLimit ) ) ; } }