java.util.Scanner;
public class Demo_1{
public static void main(String[] agrs) {
Scanner input = new Scanner(System.in);
System.out.print("Enter a number 0 and 1000: ");
int number = input.nextInt();
int numbera = number % 10;
int numberb = number / 10;
int numberc= numberb % 10;
int numberd= numberc % 10;
int sum = numbera + numberc + numberd;
System.out.println("The sum of the digits is " + sum );
}
}