B2124 判断字符串是否为回文
查看原帖
B2124 判断字符串是否为回文
1073177
Peruere楼主2023/9/29 16:07

蒟蒻的代码!!求助大佬``` #include<bits/stdc++.h> using namespace std; int main(){ char a[10000+10],b[10000+10]; cin>>a; b==a; bool o; for(int i=strlen(a);i>=1;i--){ for(int j=1;j<=strlen(a);j++){ if(a[j]==b[i]){ o=1; } else o=0; } } if(o==1) cout<<"yes"; if(o==0) cout<<"no"; return 0;
}

2023/9/29 16:07
加载中...