本文主要是介绍美元的阿拉伯数字转换为英文大写的格式,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
美元的阿拉伯数字转换为英文大写的格式,参考了网上的代码,然后重构整理了一下。
package com.proviaa.ipds.test;import com.proviaa.ipds.util.CommonUtils;/*** 把表示美元的阿拉伯数字转换为英文大写的格式。* * @author Ken* */
public class DollarsNumberFormat {private static final String[] MAJORS = { " ", " Thousand ", " Million "," Billion ", " Trillion ", " Quadrillion ", " Quintillion " };private static final String[] TENS = { " ", " Ten ", " Twenty ", " Thirty "," Forty ", " Fifty ", " Sixty ", " Seventy ", " Eighty "," Ninety " };private static final String[] NUMBERS = { " ", " One ", " Two ", " Three "," Four ", " Five ", " Six ", " Seven ", " Eight ", " Nine "," Ten ", " Eleven ", " Twelve "
这篇关于美元的阿拉伯数字转换为英文大写的格式的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!