import [Link].
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([Link]);
// Declare the variables
int number;
int result;
//Prompt a user to enter a 6 digits integer
[Link]("Enter a six digits number:");
number = [Link]();
//Check if a number satisfy the condition
if (number < 100000 || number > 999999){
[Link]("Error:The number must be exactly six
digits.");
}
else{
[Link]("");
}
//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) [Link](10, i) % 10;
[Link]("The result is:" + digits);
}
}