二分法索引!- -| 回首页 | 2005年索引 | - -利用递归方法求5的阶乘!

一个5位数,判断它是不是回文数!

                                      

一个5位数,判断它是不是回文数!


main( )
{
long ge,shi,qian,wan,x;
scanf("%ld",&x);
wan=x/10000;
qian=x%10000/1000;
shi=x%100/10;
ge=x%10;
if (ge==wan&&shi==qian)/*个位等于万位并且十位等于千位*/
 printf("this number is a huiwen ");
else
 printf("this number is not a huiwen ");
}
 

【作者: 刘加开】【访问统计:】【2005年03月16日 星期三 16:44】【 加入博采】【打印

Trackback

你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=951189

回复

- 评论人:哈哈   2006-10-14 02:17:22   

位数大与5呢?

验证码:   
评论内容: