Problem with the IDE. it is working for turbo c++

recursive f’n to check if string of no.s is a palindrome:
#include

using namespace std;

bool is_palindrome(int arr[], int s, int e)
{
if(e==0 || e==1)
return true;

if(s<=e)
{
if(arr[s]==arr[e])
{
s++;
e–;
cout<<s<<" "<<e<<endl;
return(is_palindrome(arr,s,e)) ;
}

if(arr[s]!=arr[e])
{
cout<<“wrong”<<endl;return false;
}

}
else
return is_palindrome(arr,s-1,e+1);
return true;

}//end of is_palindrome

int main()
{
int a[10000];
int n;

for(int i=0 ; i<n ; i++)
cin>>a[i];

if(is_palindrome(a,0,n-1))
cout<<"true";
else
cout<<"false";
return 0;

}

@amangupta
you have missed cin>>n; your code is always printing “true”

@amangupta
Delete all unnecessary lines in is_palindrome() function. Also base case should be
if(s>=e) return true;

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.