描述

将一个三位数反向输出。

输入一个三位数n。输出反向输出n。样例输入

100

样例输出

001
 1 #include<stdio.h>
 2 #include<math.h>
 3 int main()
 4 {
 5     char a[3];
 6     int i;
 7     scanf("%s",&a);
 8     for(i=2;i>=0;i--)
 9         printf("%d",a[i]-'0');
10     printf("\n");
11     return 0;
12 }

 

相关文章:

  • 2022-01-17
  • 2022-12-23
  • 2021-09-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-08
  • 2021-07-03
相关资源
相似解决方案