import java.util.Scanner;
public class ZhongWen {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("请输入数字:");
String line = sc.nextLine();
byte[] bys = line.getBytes();
char[] ch = { '零', '一', '二', '三', '四', '五', '六', '七', '八', '九' };
for (int x = 0; x < bys.length; x++) {
for (int y = 0; y < ch.length; y++) {
if (bys[x] == y) {
System.out.println(ch[y]);
}
}
}
} }
|
|