// BINARY SEARCH PROGRAM BY MYSCIENCEDICTIONARY.COM #include #include void main() { clrscr(); int a[10],i,n,m,l=0,h=9; cout<<"\n******************************* BINARY SEARCH ********************************"; cout<<"\n\n\n\t Enter 10 Values in ascending order:\t"; for(i=0;i<=9;i++) cin>>a[i]; cout<<"\n\n\t\t Enter a value to be searched :\t"; cin>>n; while(l<=h) { m=(l+h)/2; if(a[m]==n) { cout<<"\n\n\t\t Number found at "<a[m]) { l=m+1; } else if(nh) cout<<"\n\t Number not found"; getch(); }