package homework;
import java.util.Scanner;
/**
* @ClassName: numberone.java
* @Description: TODO(用一句话描述该文件做什么)
* @author 范海涛
* @version V1.0
* @Date 2019-7-23 上午8:48:46
*/
public class numberone {
//请输入4位会员卡号: 4位 ,会员卡号是:**** 千位是, 百位是, 十位是, 个位是,会员卡号各位之和是
public static void main(String[] args){
Scanner input = new Scanner(System.in);
System.out.print("请输入四位卡号:");
int ka = input.nextInt();
System.out.println("会员卡号是:"+ka);
int gei = ka;
int shi = ka/10;
int bai = ka/100;
int qian = ka/1000;
System.out.println("会员卡号分别是个位:"+gei+ ";十位:"+shi+ ";百位:"+bai+ ";千位:"+qian);
int he = gei+shi+bai+qian;
System.out.println("卡号各位之和是:"+he);
}
}