Problem S: 零起点学算法14——三位数反转

#include<stdio.h>
#include<stdlib.h>
int main()
{
    int a,b,c,s;
    scanf("%d",&s);
    a=s/100;
    b=s%100/10;
    c=s%100%10;
    printf("%d%d%d",c,b,a);
    system("pause");
    return 0;
}

 

posted @ 2018-09-28 19:02  MichaelCecil  阅读(679)  评论(0编辑  收藏  举报