Driver Code
public static void Main ( ) { int i ; int [ ] arr = { 10 , 20 , 30 , 40 , 50 } ; int n = arr . Length ; int key = 30 ; Console . Write ( " Array ▁ before ▁ deletion : STRNEWLINE " ) ; for ( i = 0 ; i < n ; i ++ ) Console . Write ( arr [ i ] + " ▁ " ) ; n = deleteElement ( arr , n , key ) ; Console . Write ( " STRNEWLINE STRNEWLINE Array ▁ after ▁ deletion : STRNEWLINE " ) ; for ( i = 0 ; i < n ; i ++ ) Console . Write ( arr [ i ] + " ▁ " ) ; } }