A三位数翻转.cpp 375 B

12345678910111213141516171819
  1. #include<stdio.h>
  2. #include<math.h>
  3. int main()
  4. {int a,b,c,x;
  5. scanf("%d",&x);
  6. a=x/100;
  7. b=x/10%10;
  8. c=x%10;
  9. printf("%d\n",c*100+b*10+a);
  10. return 0;
  11. }
  12. /**************************************************************
  13. Problem: 1272
  14. User: acm
  15. Language: C++
  16. Result: 正确
  17. Time:0 ms
  18. Memory:944 kb
  19. ****************************************************************/