Driver Code
int main ( ) { int arr [ ] = { 10 , 20 , 80 , 30 , 60 , 50 , 110 , 100 , 130 , 170 } ; int x = 130 ; int n = sizeof ( arr ) / sizeof ( arr [ 0 ] ) ; if ( search ( arr , n , x ) ) cout << " Yes " ; else cout << " No " ; return 0 ; }