---------------------------------------------------------------
ÎÒÓÃC++д¹ýÒ»¸ö,´úÂë²»ÔÚÉí±ß.
²»¹ý¿ÉÒÔÌáʾһÏÂ,½«½ð¶î4λһ·Ö,±ÈÈç1234567¿ÉÒÔ²ð·ÖΪ1234ºÍ567.ÁíÍâ,Êý×ÖÖмäÓÐÁãµÄ»°±ØÐëдÁã,µ«Òª×¢Òâ¶à¸öÁãµÄÇé¿ö.ÏêϸµÄÔõôдÄã¿ÉÒÔÎÊÎÊ×ö²ÆÎñµÄÈË.
---------------------------------------------------------------
ÎÒÒÔǰд¹ý
˵һÏÂ˼·
ÏÈ°ÑÊý×Ö·Ö³ÉÕûÊýСÊý
¼ÙÈçÕûÊý100909Ó¦¸ÃÊÇÊ®ÍòÁã¾Å°ÙÁã¾Å
ÓÐÊý×é
Ò»¸ö£ºÁ㣬һ£¬¶þ£¬Èý£¬ËÄ£¬Î壬Áù£¬Æߣ¬°Ë£¬¾Å
Ò»¸ö£ºÔª£¬½Ç£¬·Ö£¬Àå
Ò»¸ö£ºÔª£¬Ê®£¬°Ù£¬Ç§£¬Íò£¬Ê®£¬°Ù£¬Ç§£¬ÒÚ
È»ºóÒÀ´Îȥȡ¾Í¿ÉÒÔÁË
100909
ÉÏÃæ»áÆ´³ö
һʮÁãÁã¾Å°ÙÁã¾ÅÔª
ÄãÅöµ½Íòλ²¹Íò£¬Á½¸öÁã±ä³ÉÒ»¸ö
---------------------------------------------------------------
Óиö±È½Ï±¿µãµÄ£º
ÅжÏÿ¸ö×Ö·û,È»ºóÌõ¼þif(c.equals("1")){.....}
ÒÀ´ËÀàÍÆ¡£¡£¡£¡£
---------------------------------------------------------------
http://www.csdn.net/Develop/Read_Article.asp?Id=15823
---------------------------------------------------------------
´ÓCSDNÉÏÕûÀí³öÎå¸ö·½°¸£¬Çë²Î¿¼£º
1¡¢£¨JAVA£©
public static String numtochinese(String input){
String s1="ÁãÒ¼·¡ÈþËÁÎé½Æâ°Æ¾Á";
String s4="·Ö½ÇÕûԪʰ°ÛǪÍòÊ°°ÛǪÒÚÊ°°ÛǪ";
String temp="";
String result="";
if (input==null) return "ÊäÈë×Ö´®²»ÊÇÊý×Ö´®Ö»ÄÜ°üÀ¨ÒÔÏÂ×Ö·û£¨´0´¡«´9´£¬´.´)£¬ÊäÈë×Ö´®×î´óÖ»Äܾ«È·µ½ÇªÒÚ£¬Ð¡ÊýµãÖ»ÄÜÁ½Î»£¡";
temp=input.trim();
float f;
try{
f=Float.parseFloat(temp);
}catch(Exception e){return "ÊäÈë×Ö´®²»ÊÇÊý×Ö´®Ö»ÄÜ°üÀ¨ÒÔÏÂ×Ö·û£¨´0´¡«´9´£¬´.´)£¬ÊäÈë×Ö´®×î´óÖ»Äܾ«È·µ½ÇªÒÚ£¬Ð¡ÊýµãÖ»ÄÜÁ½Î»£¡";}
int len=0;
if (temp.indexOf(".")==-1) len=temp.length();
else len=temp.indexOf(".");
if(len>s4.length()-3) return("ÊäÈë×Ö´®×î´óÖ»Äܾ«È·µ½ÇªÒÚ£¬Ð¡ÊýµãÖ»ÄÜÁ½Î»£¡");
int n1,n2=0;
String num="";
String unit="";
for(int i=0;i
if(i==len) {continue;}
n1=Integer.parseInt(String.valueOf(temp.charAt(i)));
num=s1.substring(n1,n1+1);
n1=len-i+2;
unit=s4.substring(n1,n1+1);
result=result.concat(num).concat(unit);
}
if ((len==temp.length()) ¦ ¦(len==temp.length()-1)) result=result.concat("Õû");
if (len==temp.length()-2) result=result.concat("Áã·Ö");
return result;
}
2¡¢£¨JSP£©