求助,编译错误
查看原帖
求助,编译错误
1061254
ZHgreen1225楼主2023/8/29 10:18

编译错误,求助!!!

#include<bits/stdc++.h>
using namesapce std;
bool ish(string a)
{
    string temp="";
    int ans=1;
    while (ans<a.size()-1)
    {
        temp+=a[a.size-ans];
        ans++;
    }
    return temp==a;
}
int main()
{
    string s;
    cin>>s;
    if (ish(s))cout<<"yes";
    else cout<<"no";
    return 0;
}
2023/8/29 10:18
加载中...