推介:| Loan | Investment Course | CFP course | Mutual Funds | Property Agency | Financing | Corporate Finance | Mortgage |

發新話題
打印

抽新股 支票銀碼一問?

Try below, and choose the "currency" in the pulldown menus inside the JAVA box:

http://www.thisiscool.com/Num-Num.htm

and remember, this is no "s" following Thousand, Hundred etc.

I used to write a program in "C++" for changing the numbers into currency, and quite complicated and need to use "recursive" algorithm and easily lead to an infinity loop and hang the PC.

[ 本帖最後由 b4321 於 2007-1-31 12:33 編輯 ]

TOP

Actually, don't be scaried by the numbers, there is a way by the American that by adding commas:
$145452.96 -> $145,452.96
So the number is divided into 3 parts and it is simple if u spell the numbers:
a) 145   -> One Hundred Forty Five
b) 452   -> Four Hundred Fifty Two
c) .96    -> Ninety Six

a) is in the "Thousand", and c) is in the Cents level, so you just join them together:
One Hundred Forty Five THOUSAND Four Hundred Fifty Two and Ninety Six Cents.

There is no any "s" after THOUSAND etc.

So, try another group $123145452.96 -> $123,145,452.96
a) 123 -> One hundred twenty three (Million)
b) 145 -> One Hundred forty five (Thousand)
c) 452 -> Four hundred fifty two
d) .96 -> Ninety Six

Again by joining together, you will get
One hundred twenty three Million One Hundred forty five Thousand Four hundred fifty two And Ninety Six Cents

[ 本帖最後由 b4321 於 2007-1-31 16:19 編輯 ]

TOP

It's one of the algorithm to be used to decide the "million", "thousand" etc level in a computer program. And so now u should know why the American like to put "commas" in the numbers.

TOP

發新話題


重要聲明:本討論區是以即時上載留言的方式運作,本網站對所有留言的真實性、完整性及立場等,不負任何法律責任。而一切留言之言論只代表留言者個人意見,並非本網站之立場,用戶不應信賴內容,並應自行判斷內容之真實性。於有關情形下,用戶應尋求專業意見(如涉及醫療、法律或投資等問題)。由於本討論區受到「即時上載留言」運作方式所規限,故不能完全監察所有留言,若讀者發現有留言出現問題,請聯絡我們。本討論區有權刪除任何留言及拒絕任何人士上載留言,同時亦有不刪除留言的權利。切勿撰寫粗言穢語、誹謗、渲染色情暴力或人身攻擊的言論,敬請自律。本網站保留一切法律權利。


Copyright 1997- Xocat. All Right Reserved.