import java.util.Scanner;
public class U1_L5_Activity_One {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.print("Please enter a two digit number: ");
int x = scan.nextInt();
System.out.println("Here are the digits:");
System.out.println(x/100);
System.out.println((x/10)%10); <em>//Just divide the result by 10 and find the remainder</em>
System.out.println(x%10);
}
}
<em>//Or, you can do that way:</em>
<em />
import java.util.Scanner;
public class U1_L5_Activity_One {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.print("Please enter a two digit number: ");
String[] x = scan.nextLine().split(""); <em>//We need it to be a string array, to split the values after "", that is, after each symbol(number)</em>
System.out.println("Here are the digits:");
for(int i = 0; i<x.length; i++) {
System.out.println(Integer.parseInt(x[i])); <em>//Converting the string into int, as you want</em>
}
}
}