Java digital conversion and java Conversion

Source: Internet
Author: User

Java digital conversion and java Conversion

1. Input a string of characters through the command line to determine whether these characters are all a few characters. If any character is not a number, the program ends by outputting "user-input characters are not all numbers and cannot be converted" on the command line;

If all characters entered by the user are numbers, convert the numbers to an uppercase Chinese Table (the user can enter a maximum of 8 characters each time ).

Input and Output example:

Input: 1234567

Output: 1,234,567

Input: 0001

Output: 1

Input: 1001

Output: One Thousand and One

Input: 1100

Output: one thousand one hundred

Beijing shengsiyuan Technology Co., Ltd. All Rights Reserved

Input: 10100

Output: Ten thousand one hundred

Input: 0010

Output: 10

Input: 00000001

Output: 1

Input: 10000001

Output: 10,000,001

Input: 10000010

Output: 10,000,010

Input: 10000100

Output: 10,000,100

Input: 11000000

Output: 11 million

Beijing shengsiyuan Technology Co., Ltd. All Rights Reserved

Input: 10100000

Output: 10.1 million

Input: 10010000

Output: 10.01 million

Input: 10001000

Output: 10,001,000

Input: a00045

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.