Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 'B':
- scanf("%d",&element);
- result=binary_search(element);
- if(result==-1){
- printf("\nElement not exist\n");
- }
- else{
- printf("\nFound at position %d\n",result);
- }
- print();
- break;
- case 'R':
- scanf("%d",&element);
- result=binary_search(length, 0, element);
- if(result==-1){
- printf("\nElement not exist\n");
- }
- else{
- printf("\nFound at position %d\n",result);
- }
- print();
- break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement