I see that there are more and more discussions about challenging batch processing algorithms in the forum, and there are also a group of brothers who are enthusiastic about exploring the potential of batch processing. I am very happy that some tasks not very suitable for batch processing are gradually being completed by batch processing.
Now I plan a topic - converting digital amounts to uppercase. This topic can almost find versions in any popular language on the Internet, but there is a lack of a batch processing version. Of course, we can't expect foreigners to do this, and then we can learn from it ^_^.
The rules are as follows:
1. Receive a string of amount numbers and convert them to uppercase. The possible reasonable formats are 5821564130 or 5821564.130 or 5,821,564.130, etc.
There will be no numbers with unclear decimal places such as 58.215.64.130 or other non-amount digital characters.
2. The maximum digit is up to one hundred billion, and the minimum digit is up to cents, and the digits after cents are ignored.
3. It should be completed purely by batch processing under CMD without using third-party tools.
4. The specific conversion basis is as per the appendix.
Appendix:
Hexadecimal relationship table:
┌─┬─┬─┬───┐
│Small│Simple│Complex│ Hexadecimal │
├─┼─┼─┼───┤
│One│壹│壹│ 1 │
├─┼─┼─┼───┤
│Two│贰│貳│ 2 │
├─┼─┼─┼───┤
│Three│叁│叄│ 3 │
├─┼─┼─┼───┤
│Four│肆│肆│ 4 │
├─┼─┼─┼───┤
│Five│伍│伍│ 5 │
├─┼─┼─┼───┤
│Six│陆│陸│ 6 │
├─┼─┼─┼───┤
│Seven│柒│柒│ 7 │
├─┼─┼─┼───┤
│Eight│捌│捌│ 8 │
├─┼─┼─┼───┤
│Nine│玖│玖│ 9 │
├─┼─┼─┼───┤
│Ten│十│拾│ 10 │
├─┼─┼─┼───┤
│Hundred│佰│佰│ 100 │
├─┼─┼─┼───┤
│Thousand│仟│仟│ 1000 │
├─┼─┼─┼───┤
│Ten thousand│万│萬│ 10^4 │
├─┼─┼─┼───┤
│Hundred million│亿│億│ 10^8 │
├─┼─┼─┼───┤
│Trillion│兆│兆│ 10^12│
└─┴─┴─┴───┘
For details: http://wiki.keyin.cn/index.php?title=%E4%B8%AD%E6%96%87%E6%95%B0%E5%AD%97&variant=zh-cn
Now I plan a topic - converting digital amounts to uppercase. This topic can almost find versions in any popular language on the Internet, but there is a lack of a batch processing version. Of course, we can't expect foreigners to do this, and then we can learn from it ^_^.
The rules are as follows:
1. Receive a string of amount numbers and convert them to uppercase. The possible reasonable formats are 5821564130 or 5821564.130 or 5,821,564.130, etc.
There will be no numbers with unclear decimal places such as 58.215.64.130 or other non-amount digital characters.
2. The maximum digit is up to one hundred billion, and the minimum digit is up to cents, and the digits after cents are ignored.
3. It should be completed purely by batch processing under CMD without using third-party tools.
4. The specific conversion basis is as per the appendix.
Appendix:
Basic Regulations for Correctly Filling Out Bills and Settlement Vouchers
Bills and settlement vouchers filled out by banks, units, and individuals are important bases for handling payment settlements and cash receipts and payments, directly related to the accuracy, timeliness, and safety of payment settlements. Bills and settlement vouchers are accounting vouchers for banks, units, and individuals to record accounts, and are a written certificate for recording economic business and clarifying economic responsibilities. Therefore, when filling out bills and settlement vouchers, they must be standardized and standardized, with complete elements, correct numbers, clear handwriting, no omissions or mistakes, no scribbles, and prevention of alteration.
1. Chinese capital amount numbers should be filled in with regular script or running script, such as壹 (壹), 贰 (貳), 叁 (參), 肆 (肆), 伍 (伍), 陆 (陸), 柒, 捌, 玖, 拾, 佰, 仟, 万 (萬), 亿, 元, 角, 分, 零, 整 (正), etc. Words like 一, 二 (两), 三, 四, 五, 六, 七, 八, 九, 十, 念, 毛, 另 (or 0) should not be used, and simplified characters should not be made up. If complex characters such as 贰, 陆, 亿, 万, 圆 are used in the writing of amount numbers, they should also be accepted.
2. If the Chinese capital amount number ends with "yuan", the word "整" (or "正") should be written after "yuan". After "jiao", the word "整" (or "正") may not be written. If there is "fen" in the capital amount number, the word "整" (or "正") is not written after "fen".
3. The words "Renminbi" should be marked before the Chinese capital amount number. If there is "fen" in the capital amount number, the word "整" (or "正") is not written after "fen".
4. The words "Renminbi" should be marked before the Chinese capital amount number. The Chinese capital amount number should be filled in immediately after the words "Renminbi" without leaving blanks. If the words "Renminbi" are not pre-printed in the capital amount column of bills and settlement vouchers, the words "Renminbi" should be added. The fixed words such as 仟, 佰, 拾, 万, 仟, 佰, 拾, 元, 角, 分 should not be pre-printed in the capital amount column of bills and settlement vouchers.
5. When there is "0" in the Arabic lowercase amount number, the Chinese capital should be written according to the rules of the Chinese language, the composition of the amount number, and the requirement to prevent alteration. Examples are as follows:
(1) When there is "0" in the middle of the Arabic number, the Chinese capital amount should write the word "zero". For example, ¥1,409.50 should be written as Renminbi壹仟肆佰零玖元伍角.
(2) When there are several consecutive "0" in the Arabic number, only one word "zero" can be written in the middle of the Chinese capital amount. For example, ¥6,007.14 should be written as Renminbi陆仟零柒元壹角肆分.
(3) When the ten-thousand digit or yuan digit of the Arabic amount number is "0", or there are several consecutive "0" in the middle of the number, and the ten-thousand digit and yuan digit are also "0", but the thousand digit and jiao digit are not "0", only one zero word can be written in the Chinese capital amount, or the word "zero" may not be written. For example, ¥1,680.32 should be written as Renminbi壹仟陆佰捌拾元零叁角贰分, or written as Renminbi壹仟陆佰捌拾元叁角贰分; another example, ¥107,000.53 should be written as Renminbi壹拾万柒仟元零伍角叁分, or written as Renminbi壹拾万零柒仟元伍角叁分.
(4) When the jiao digit of the Arabic amount number is "0" and the fen digit is not "0", the word "zero" should be written after "yuan" in the Chinese capital amount. For example, ¥16,409.02 should be written as Renminbi壹万陆仟肆佰零玖元零贰分; another example, ¥325.04 should be written as Renminbi叁佰贰拾伍元零肆分.
5. The Chinese yuan symbol "¥" (or cursive: ¥) should be filled in before the Arabic lowercase amount number. The Arabic lowercase amount number should be filled in carefully, and should not be written continuously and unclear.
Hexadecimal relationship table:
┌─┬─┬─┬───┐
│Small│Simple│Complex│ Hexadecimal │
├─┼─┼─┼───┤
│One│壹│壹│ 1 │
├─┼─┼─┼───┤
│Two│贰│貳│ 2 │
├─┼─┼─┼───┤
│Three│叁│叄│ 3 │
├─┼─┼─┼───┤
│Four│肆│肆│ 4 │
├─┼─┼─┼───┤
│Five│伍│伍│ 5 │
├─┼─┼─┼───┤
│Six│陆│陸│ 6 │
├─┼─┼─┼───┤
│Seven│柒│柒│ 7 │
├─┼─┼─┼───┤
│Eight│捌│捌│ 8 │
├─┼─┼─┼───┤
│Nine│玖│玖│ 9 │
├─┼─┼─┼───┤
│Ten│十│拾│ 10 │
├─┼─┼─┼───┤
│Hundred│佰│佰│ 100 │
├─┼─┼─┼───┤
│Thousand│仟│仟│ 1000 │
├─┼─┼─┼───┤
│Ten thousand│万│萬│ 10^4 │
├─┼─┼─┼───┤
│Hundred million│亿│億│ 10^8 │
├─┼─┼─┼───┤
│Trillion│兆│兆│ 10^12│
└─┴─┴─┴───┘
For details: http://wiki.keyin.cn/index.php?title=%E4%B8%AD%E6%96%87%E6%95%B0%E5%AD%97&variant=zh-cn
☆开始\运行 (WIN+R)☆
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,set/p= %,:~%i,1%<nul&ping/n 1 127.1>nul
%ComSpec% /cset,=何奈无── 。何奈可无是原,事奈无做人奈无&for,/l,%i,in,(22,-1,0)do,@call,set/p= %,:~%i,1%<nul&ping/n 1 127.1>nul

DigestI