文章

308

粉丝

0

获赞

122

访问

17.3k

头像
整型存储 题解:
P1440 北京理工大学机试题
发布于2026年2月4日 20:29
阅读数 51

#include<stdio.h>
int main()
{
    int n;
    int count=0;
    while(scanf("%d",&n))
    {
        if(n==0 ||count==10)
        {
            return 0;
         } 
        printf("%d ",n);
        count++;
        int k=0;
        while(n){
            k=k*10+n%10;
            n=n/10;
        }
        printf("%d\n",k);
    }
    
    
    return 0;
 } 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发