java实现:将一个数各个位数相加
import java.util.Scanner;public class HelloWorld { public static void main(String[] args) { //System.out.println("Hello java"); Scanner s = new Scanner(System.in); System.out.println("请输入一个数字"); int num = s.nextInt(); int sum