解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(reverse(reverse(a)+reverse(b)));
}
public static int reverse(int n){
int weishu = Integer.toString(n).length();
int i=0;
int result=0;
while(n!=0){
i=n%10;
result+=Math.pow(10, weishu-1)*i;
weishu--;
n/=10;
}
return result;
}
}
0.0分
2 人评分
C语言程序设计教程(第三版)课后习题10.5 (C语言代码)浏览:1450 |
十->二进制转换 (C语言代码)浏览:1292 |
Cylinder (C语言描述+详细分析)浏览:3266 |
C语言程序设计教程(第三版)课后习题9.4 (C语言代码)浏览:646 |
数列排序 (C语言代码)浏览:617 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:468 |
1392题解(大数相加)浏览:604 |
C语言程序设计教程(第三版)课后习题6.4 (C语言代码)浏览:376 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:360 |
C语言程序设计教程(第三版)课后习题10.2 (C语言代码)浏览:1270 |