package com.itheima;
import java.util.*;
public class Test2 {
public static void main(String[] args) {
mothed();
}
public static void mothed(){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
String s = Integer.toString(a);
// System.out.println(s);
for(int i=0;i<s.length();i++){
char ch=s.charAt(i);
// System.out.println(ch);
switch(ch){
case 0:
System.out.println("零");
break;
case 1:
System.out.println("一");
break;
case 2:
System.out.println("二");
break;
case 3:
System.out.println("三");
break;
case 4:
System.out.println("四");
break;
case 5:
System.out.println("五");
break;
case 6:
System.out.println("六");
break;
case 7:
System.out.println("七");
break;
case 8:
System.out.println("八");
break;
case 9:
System.out.println("九");
break;
default:
System.out.println("没有这个数字");
break;
}
}
}
}
|
|