#include
#include
using namespace std;
int main()
{
int n=10;
int arr[10]={1,2,3,5,40,6,8};
int key;
cin>>key;
bool val=binary_search(arr,arr+n,key);
if(val)
{
cout<<"Present!";
}
else
{
cout<<"Absent!";
}
return 0;
}
if i will put input as 40, it is giving wrong output, why is it so???