Driver code
public static void Main ( string [ ] args ) { int [ ] arr = new int [ ] { 5123 , 3300 , 783 , 1111 , 890 } ; int n = arr . Length ; int max = int . MaxValue ; int min = int . MinValue ; bool flag = true ; for ( int i = 1 ; i < n ; i ++ ) {