第1个回答 2016-11-14
import java.util.Scanner;
public class Test {
public static void main(String []args){
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
int bai = num /100;
int shi = (num%100)/10;
int ge = num%10;
int sum = bai+shi+ge;
System.out.println(sum);
}
}本回答被提问者和网友采纳