用数组枚举
String[] GBK = new String[]{"壹","贰","叁"...省略};
String[] UTF = new String[]{"个","拾","百","仟","万","十万","百万","千万","亿"};
int count =1;
for(int num = 金额;num>0;num=num%10){
//获得金额位数
count++;
}
//将金额变成数组。如:10010 {1,0,0,1,0}
代码省略
//用金额数组的下标来判断具体的位数,遍历个十百千数组。中间补零
代码省略 |