1.In financial projects, it is often necessary to convert the amount of Arabic numerals into Chinese traditional forms. The renminbi is kept to a point.If input: 16700 return: one Wan qi Bai yuansuch as input: 167.5785 return: Bai Lu Qi yuan Wooker points(May use the Chinese character reference: 0, one, II, three, the restaurant, Wu, Lu, Qi, BA, JIU, pick, Bai, thousand, million, million, trillion, yuan, angle, cent.)Ideas: A, with two arrays, capnumb
Failure phenomena
Pre-installed Windows 8 G480 model, after modifying the Windows 7 system, or using the USB external keyboard to turn on the digital keypad function, typing the original letter number (such as: press the keyboard u,i,o, pop-up digital 4,5,6), can not be enabled by the keyboard fn+f8 NumLock shortcut keys /Turn off the numeric keypad.
Cause analysis
Lenovo G480 preinstalled The Windows 8
How to turn on the keypad
Computer installed on the Windows XP system, each reboot the system, manually open the numeric keypad, very inconvenient. So what are some of the ways that the system can automatically turn on the numeric keypad? Method One: Set the NumLock item to "Enable" in the BIOS, and then set the Pnpwith OS entry in the BIOS to "enable". However,
The code is as follows:
#!/usr/bin/python#-*-Encoding:utf-8-*-Import typesClass Notintegererror (Exception):PassClass Outofrangeerror (Exception):Pass_mapping = (U ' 0 ', U ' one ', U ' II ', U ' three ', U ' four ', U ' v ', U ' vi ', U ' seven ', U ' eight ', U ' IX ',)_p0 = (U ', U ' ten ', U ' hundred ', U ' thousand ',)_S4, _s8, _S16 = 10 * * 4, 10 * 8, 10 * * 16_min, _max = 0, 9999999999999999def _to_chinese4 (num):"" Convert the Arabic numera
Recently, as a result of this need, I wrote a "Arabic numerals to Chinese numerals" function ". Only one similar one is found in the search for the essence area. I felt that my algorithm was good, so I posted it and shared it. if you want to convert the amount, you need to modify the processing of the decimal part.
Function ch_num ($ num, $ mode = true ){
$ Char = array ("zero", "one", "two", "three", "si", "Wu", "Lu", "Jun ", "Success", "fail ");
$
The examples in this article describe how Python converts Arabic numerals to Roman numerals. Share to everyone for your reference. The implementation method is as follows:
def numtoromannum (num): "" "digital would be converted into Roman numerals,ex:numtoromannum (3999)" "" If num
Hopefully this article will help you with Python programming.
Ask how to generate 500,000 non-repeating 8-digit Arabic numerals with PHP. How does the code write? Ask for help? Urgent. For complete code. Auto carriage return blank line: Thank you, seniors.
Reply to discussion (solution)
for ($i = 0; $i
for ($i = 10000000; $i
for ($i = 10000000; $i You come here too?? You're not a regular water-mixing zone.Do you work in PHP? Curious and own ....
Function Rand_num ( $num) {$n = rand (10000000,9999999
are added together). Only one value can be used on the left side of a large number (that is, when the values are subtracted.
2. V, L, and D cannot be used on the left side of a large number (subtraction), but only on the right side of a large number (addition.
3. The left decimal places of V and X are only I; the left decimal places of L and C are only X; the left decimal places of D and m are only C.
Iii. Source Code
There are three classes: Roman, romanconverter, and romanexception.
Roman c
Requirement: enter an Arabic number, give the corresponding Chinese Characters in uppercase, and write it as a stored procedure or function.
For example, enter 12345, and the program will show you:For example, enter 10023040, and the program will provide the following information:
One solution (tested in sqlserver2000 ):Create Function fun_cgnum(@ Num INT)Returns varchar (100)AsBeginDeclare @ temp int, @ Res Int, @ I tinyintDeclare @ STR varchar (100)
Using System;
Namespace ConsoleApp{/// /// This class converts Arabic numerals to uppercase Chinese/// This class does not identify illegal numbers/// Call the NumToChn Method/// Public class NumFormat{Public NumFormat (){//// TODO: add the constructor logic here//}
// Convert numbersPrivate char ToNum (char x){String strChnNames = "0 August 5, 1234 ";String strNumNames = "0123456789 ";Return strChnNames [strNumNames. IndexOf (x)];}
// Convert an int
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.