main()
{
int a,b,c,i,s;
scanf("%d",&a);
c=a;
while(c>0)
{
c=c/10;
b++;
}
for(i=b;i>1;i++)
{
c=a/10^b;
a=a-c*10^b;
s=s+10^(b+1-i);
}
printf("%d",s);
}
你可以使用这个链接引用该篇文章 http://publishblog.blogchina.com/blog/tb.b?diaryID=1379239
|
- 评论人:呵呵
2005-12-23 19:02:01
|
|||
while(c〉0)
|
||||
|
- 评论人:chengpeng
2005-07-28 16:10:34
|
|||
另一种方法:
|
||||