The title pretty much describes my question. I cannot recall what is wrong with my code, can you help me with it?
#include <bits/stdc++.h>
using namespace std;
int p(string &s, int f, int l){
if(s[f] == s[l]){
return(s, f +1, l-1);
}
else{
return 0;
}
if(f-l == 1 || f == l){
return 1;
}
}
int main(){
string s;
cin >> s;
int f = 0;
int l = s.length()-1;
if(p(s, f, l)){
cout << "YA";
}
else{
cout << "BUKAN";
}
}