#18476: 解答


321123 (123321)

School : 新北市立中山國中
ID : 98699
IP address : [114.32.37.174]
Last Login :
2019-07-24 08:22:32
a038. 數字翻轉 | From: [114.32.37.174] | Post Date : 2019-07-17 09:22

#include <stdio.h>


int main() 
{

    int i, j;

    while(scanf("%d",&i)!=EOF)
    {
        j = 0;

        while(i)
        {
           j *= 10;
           j += i % 10;
           i /= 10;
        }
        printf("%d\n",j);

    }

    return 0;
}
 
ZeroJudge Forum