您好,欢迎来到爱go旅游网。
搜索
您的当前位置:首页回文数c程序

回文数c程序

来源:爱go旅游网


//x回文数

#include

#define N 20

int main()

{

int x,s,tag;

char a[N];

printf(\"Please input numbers and it's length less then %d:\

s=1;

while(s{ scanf(\"%c\

if(a[s]==10)break;

s++;

}

printf(\"\\nThe numbers is :\\n\");

for(x=1;x{

printf(\"%c\

}

tag=0;

for(x=1;x{

if(a[x]!=a[s-x])

{ tag=1;

break;

}

}

if(tag==0)printf(\"\\nThe number is palindrome!\");

else printf(\"\\nThe number isn't palindrome!\");

}

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- igat.cn 版权所有

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务