Not giving correct output

#include
using namespace std;
int main() {
// cout<<“Hello World!”;
//Pivot Element in an Sorted Array
int a[]={6,7,1,2,3,4,5};
int n=sizeof(a)/sizeof(int);
int s=0;
int e=n-1;
int mid=(s+e)/2;
while(s<=e)
{
int mid=(s+e)/2;
if(mid<e && a[mid]>a[mid+1])
{
cout<<mid<<" “;
}
if(mid>s && a[mid]<a[mid-1])
{
cout<<mid-1<<” ";
}
if(a[s]>=a[mid])
{
e=mid-1;
}
else
{
s=mid+1;
}

}

if(s>e)
{
cout<<“Pivot Element is not there.”<<endl;
}
}

Please save your code on ide.codingblocks.com and then share its link.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.