package chp1; |
import java.util.Scanner; |
public class SanWeiShu { |
public static void main(String[] args) { |
Scanner sc = new Scanner(System.in); |
int n = sc.nextInt(); |
//百位数 |
int a = n / 100 ; |
//十位数 |
int b = n / 10 % 10 ; |
//个位数 |
int c = n % 10 ; |
System.out.println(a + b + c); |
} |
} |
by: 发表于:2017-07-13 10:59:57 顶(0) | 踩(0) 回复
??
回复评论