import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner scan = new Scanner(System.in);
while (true) {
System.out.print("10~99 사이의 숫자를 입력하시오:");
String num = scan.next();
try {
if(num.length()>2) {
continue;
}
int i = Integer.parseInt(num);
if(i<10 || i>99 ) {
continue;
}
System.out.println("10의 자리수: "+num.charAt(0));
System.out.println(" 1의 자리수: "+num.charAt(1));
break;
}catch (NumberFormatException e) {
continue;
}
}
}
}