Write a program to accept a elements into an array and search for a number using binary search technique.
Algorithm
Step Step Step Step 1-Start 2-declaring class chars and data members 3-Creating object of the class chars to call the function 4-Calling the function void accept() definition of void accept() accepting the string End function Step 5-Calling the function void search() Definition of void search while(max>=min) mid (max+min)/2 if(a[mid]<item) min mid+1 else if(a[mid>item) max mid-1 else if(a[mid]==item) print-item is present at+(mid+1)+position if(f==0) print-item+is not present End fucntion Step 6-End