当前位置:首页 » 信托交易 » hunbit交易所下载
扩展阅读
股票投资经济学 2021-06-17 16:24:20

hunbit交易所下载

发布时间: 2021-06-15 12:10:10

1. 供给我各种缩写单词.如WTO(世界贸易组织)

OTC 人才
UFO 不明飞行物

2. JAVA的一个面试题谁帮我解决下

编译ok 很简单
public static String change(String s){
String[] s1 = { "", "拾", "佰", "仟" };
String[] s2 = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" };
String[] s3 = { "元整", "万", "亿" };
String[] s4 = { "万", "亿" };
s = s.substring(1);
String result = "";
for (int i = 0; i < s.length(); i++) {
int numIndex = (int) s.charAt(i) - 48;
int index = s.length() - 1 - i;
int unitIndex = index % 4;
if (numIndex != 0 || unitIndex != 3) {
result += s2[numIndex];
}
if (numIndex != 0) {
result += s1[unitIndex];
}
if (unitIndex == 0) {
if (index >= 12) {
result += s4[(index - 1) / 4 % 2];
} else {
result += s3[index / 4 % 3];
}
}
}
return result;
}

测试数据:
public static void main(String[] args) {

System.out.println(change("¥332011011134561018"));
}

结果为:叁拾叁亿贰仟零壹拾壹万壹佰壹拾壹亿叁仟肆佰伍拾陆万壹仟零壹拾捌元整