csfw.net
当前位置:首页>>关于如何用java编一个程序将输入的阿拉伯数字转换成大...的资料>>

如何用java编一个程序将输入的阿拉伯数字转换成大...

public class test { public static void main(String args[]) { int ss = Integer.parseInt(args[0]); if(ss==0) System.out.println("零"); else if (ss==1) System.out.println("壹"); else if (ss==2) System.out.println("贰"); else if (s...

import java.util.Scanner; public class Num { public Num() {} static String []bigNum={"零","一","二","三","四","五","六","七","八","九"}; static String getNUM(String str) { int t=Integer.parseInt(str); return bigNum[t]; } public...

public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int s = Integer.parseInt(sc.next()); System.out.println(toRome(s)); sc.close(); } // 阿拉伯数字转罗马数字: // 把所有小数字在前的...

public class MoneyUtil { public static String[] chineseDigits = new String[] { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖"}; /** * 把金额转换为汉字表示的数量,小数点后四舍五入保留两位 * @param amount * @return */...

public static char fn1(char a)//方法1 { switch(a) { case '一': return '1'; case '二': return '2'; case '三': return '3'; case '四': return '4'; case '五': return '5'; case '六': return '6'; case '七': return '7'; case '八': ret...

有个简单的转换,支持10亿以内 public class Test { public static void test(int d) {// String[] str = { "零", "壹", "贰", "叁", "肆", "伍", "陆", "柒", "捌", "玖" }; String[] str = { "零", "一", "二", "三", "四", "五", "六", "七",...

很简单的程序,我就不写注释了吧 import java.util.Scanner;public class EnglishNumberFormatter {private static final String[] BITS = {"ONE", "TWO", "THREE", "FOUR", "FIVE","SIX", "SEVEN", "EIGHT,", "NINE", "TEN"};private static fi...

public class RenMingBi { /** * @param args add by zxx ,Nov 29, 2008 */ private static final char[] data = new char[]{ '零','壹','贰','叁','肆','伍','陆','柒','捌','玖' }; private static final char[] units = new char[]{ '元','拾...

...你想的太复杂了 public static void main(String[] args) { //这里有定义成一个数组...这样才方便 String x[]={"zero","one","two", "three","four", "five","six","seven","eight","nine", "ten","eleven","twelve","thirteen","fourteen","...

百度好多的 http://zhidao.baidu.com/question/116147914.html http://zhidao.baidu.com/question/324988713.html http://zhidao.baidu.com/question/211296935.html

网站首页 | 网站地图
All rights reserved Powered by www.csfw.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com