#include<iostream>
#include<cmath>
#include<string.h>
using namespace std;
char a[101];
string IsPalindrome(char str[],int n)
{
int i=0,j=n-2;
while(i<j)
{
if(str[i]!=str[j])
return"No";
i++,j--;
}
return "Yes";
}
int main()
{
cin>>a;
cout<<IsPalindrome(a,strlen(a));
return 0;
}
想要其他题目答案,黑客小程序,或c++基础的,关注我。
求点赞!