xdrn.net
当前位置:首页 >> 编写一个JAvA程序读入英文的ZEro到NinE,输出其对应... >>

编写一个JAvA程序读入英文的ZEro到NinE,输出其对应...

非要用try-catch的话,这样行不行? public String nvl(String str,String newStr){ return str == null || "".equalsIgnoreCase(str)?newStr:str; } public void output(String numberStr){ numberStr = nvl(numberStr,"wrongNumber"); if("one...

用数组,岂不是更方便? public class Test { public static void main(String[] args) { String s[]={"zero","one","two","three","four","five","six","seven","egiht","nine","ten"}; Scanner scan = new Scanner(System.in); String input =...

#include #include int wei(int a) { int i,d; for(i=1;a>=0;++i) { d=a; a=a-pow(10,i); if(a>=0) a=d; else return i; } } int transfer(int c) { switch(c) { case 0:printf("zero,");break; case 1:printf("one,");break; case 2:printf("tw...

都可以。都可以。都可以。都可以。都可以。

这个价位的你可以买到很多手机了。

public class Util { public static void main(String[] args) { digitToString(); } public static void digitToString(){ int i=0; while(i>=0 && i

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