-->
当前位置:首页 > 题库

PROGRAMMING:Gold necklace for sale

Luz5年前 (2021-05-10)题库401
Please write a program to input the price of gold and the weight of necklace, calculate the total amount and print the bill.
Note: the largest unit of total amount is only 100 million (less than 1 billion).
####Input format
Gold price and weight (both positive real numbers)
####Output format
See the output example.
Note: unit price, weight and amount are required to output 2 decimal places (automatic rounding), and amount is also required to output in words.
The Chinese characters used for capital figures and amount units are as follows:
-The capitals of numbers 0-9 are: zero, one, two, three, four, five, six, seven, eight and nine.
-The amount units from small to large are: Fen, Jiao, yuan, Shi, Bai, Qian, Wan, Shi, Bai, Qian and Yi.
####Input sample
```in
351.65 14.5
```
####Output sample
```out
Unit price: 351.65 yuan / g
Weight: 14.50g
Amount: 5098.93 yuan
In words: five thousand and ninety-eight yuan and ninety-three cents
```







answer:If there is no answer, please comment