//任意输入一个四位数,输出各个位数数值
import java.util.Scanner;
public class TestSum
{
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
System.out.println("请输入一个四位数:");
int num=sc.nextInt();
int thu=num/1000;
int hun=num%1000/100;
int ten=num%100/10;
int sig=num%10;
System.out.println("千位数是:"+thu);
System.out.println("百位数是:"+hun);
System.out.println("十位数是:"+ten);
System.out.println("个位数是:"+sig);
}
}