题解 1866: 三位数反转

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

三位数反转

摘要:#include<stdio.h>int main(){int n,a,b,c,t;while(scanf("%d",&n)==1){a=n/100;b=n%100/10;c=n%10;t=c*100……

1866: 三位数反转

摘要:这道题我居然错了四次,我真是要吐了,如果也有像我一样的小伙伴,那就把代码贴过去吧。 ```cpp #include using namespace std; int main() { ……

1866: 三位数反转(Python)

摘要:解题思路:注意事项:参考代码:while True:     try:         n = input()         m = n[::-1]         

三位数反转 (C++代码)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int main(){   int a,b,c,n;  ……

1866: 三位数反转

摘要:解题思路:首先,通过scanf函数获取一个整数作为输入,存储在变量n中。然后,将n除以100,得到百位数字,存储在变量a中。使用取余操作获取十位数字,即n % 100,再除以10,得到十位数字,存储在……

三位数反转 (C语言代码)

摘要:解题思路:用字符串保存直接反输出注意事项:直接输出printf("%c%c%c",s[2],s[1],s[0]);是错误的  因为输入两位数的时候,s[2]是&#39;\0&#39;了参考代码:#in……