上海口译官网:关于C++编程

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/25 16:49:13
程序填空判断字符串是否是回文
#include<string.h>
#include<iostream.h>
#include<stdio.h>
void main()
{
char s[81],*p1,*p2;
int n;
cin>>s;
n=strlen(s);
p1=s;
p2=_____________&s[80]______________;
while( )
if (*p1!=*p2) break;
else
{
p1++;
p2--____________;
}
if (p1<p2)
cout<<"no /n";
else
cout<<yes /n";
}

i nat kaq