Skip to content

Commit 13f120e

Browse files
committed
add etc
1 parent b533c62 commit 13f120e

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

src/其他/阿拉伯数字转中文/Main.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ public class Main {
88
private static final char[] units = {'十', '百', '千', '万', '亿'};
99
private static final StringBuilder ans = new StringBuilder();
1010

11-
/**
12-
* 采用递归的方法将转换的结果存储到 ans 变量中, 注意 `万` 和 `亿` 在 units 数组中不是连续的, 所以
13-
* 当数字达到5位数或9位数时, 我们分开讨论。
14-
*
15-
* @param num
16-
*/
1711
private static void intToChineseNum(int num) {
1812
String s = String.valueOf(num);
1913
char[] chars = s.toCharArray();
@@ -53,9 +47,4 @@ private static void intToChineseNum(int num) {
5347
}
5448
}
5549
}
56-
57-
public static void main(String[] args) {
58-
Main.intToChineseNum(121399013);
59-
System.out.println(ans.toString());
60-
}
6150
}

0 commit comments

Comments
 (0)