谁用C帮我做下这题! 谢谢了

[复制链接]
查看11 | 回复2 | 2009-5-26 17:20:59 | 显示全部楼层 |阅读模式
#include#include /*tc不用*/ #include /*tc不用*/ int palindromeyesno(int n) {/*判断一个数是否为回文数*/ int backn=n; int temp=0; while(backn!=0) { temp*=10; temp+=backn%10; backn/=10; } return (temp==n?1:0); } int getPalindromeByNo(int no) {/*取得第n个回文数*/ int count=1,i=1; for(i=1...
回复

使用道具 举报

千问 | 2009-5-26 17:20:59 | 显示全部楼层
//没有写注释,不过代码很简单,将就着看一下吧。 #include "stdio.h" #include "string.h" bool huiwen(long m,bool in_recursion=true) { if(!in_recursion) { if(!huiwen(m))return false; if(!h...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行