text: main function
code: public static void Main ( ) { int [ ] arr = { 4 , 5 , 6 , 7 , 8 , 9 , 1 , 2 , 3 } ; int n = arr . Length ; int key = 6 ; int i = search ( arr , 0 , n - 1 , key ) ; if ( i != - 1 ) Console . WriteLine ( " Index : ▁ " + i ) ; else Console . WriteLine ( " Key ▁ not ▁ found " ) ; } }