请高手诊断
//测试文本是否回环#include<iostream.h>
#define SIZE=30;
main()
{
char words[30],words1[30];
int ctr,ctr1,ctr2;
ctr2=0;
cout<<"请输入需要鉴别的语句:\n";
gets(words);
puts(words);
for(ctr1=0;ctr1<30;ctr1++)
{
if((words[ctr1]>64&&words[ctr1]<91)||(words[ctr1]>96&&words[ctr1]<123))
{
words1[ctr2]=words[ctr1];
words1[ctr2+1]='\0';
ctr2++ ;}
else{continue;}
cout<<words1<<"\n"<<ctr2;
}
words1[ctr2]='\0';
ctr2--;
for(ctr=0;ctr<=ctr2;ctr++)
{words1[ctr]=words1[ctr]&223;}
cout<<"处理后语句为:"<<words1<<"\n";
cout<<ctr2;
ctr=0;
while(words1[ctr]==words1[ctr2-ctr])
{ctr++;}
ctr2++;
if (ctr==ctr2)
{cout<<"这是一个回环语句。\n";}
else
{cout<<"这不是一个回环语句。\n";}
cout<<ctr;
cin.get();
return 0;
}
" border="0" />