public class Rw2 {
public static void main(String[] args) {
System.out.println("请输入一个四位数字");
Scanner scanner = new Scanner(System.in);
int i = scanner.nextInt();
int sum = i / 1000 + (i % 1000) / 100 ;
int sum1 = (i % 100) / 10 + (i % 10);
System.out.println("前两位数相加的结果是:"+sum+","+sum1);
// System.out.println("后两位数相加的结果是:"+sum1);
int sum2 = sum + sum1;
System.out.println("再次相加的结果是:"+sum2);
}
}