import java.util.
Scanner;
public class SixDigitsSeparator{
//Main method
public static void main(String [] args){
//Use scanner object to read user input from package
Scanner input = new Scanner(System.in);
// Declare the variables
int number;
int result;
//Prompt a user to enter a 6 digits integer
System.out.println("Enter a six digits number:");
number = input.nextInt();
//Check if a number satisfy the condition
if (number < 100000 || number > 999999){
System.out.println("Error:The number must be exactly six
digits.");
}
else{
System.out.println("");
}
//Extract each digit separately by for loop
for (int i = 5; i >= 0; i--){
//Call the another method to extract digit
int digit = number / (int) Math.pow(10, i) % 10;
System.out.println("The result is:" + digits);
}
}