本人代码新手orz,发帖记录,如有错误请指正!
方法比较笨
示例:
Please input the price: 42.5
The Chinese form is: 肆拾贰圆伍角
Please input the price: 42.53
The Chinese form is: 肆拾贰圆伍角叁分
Please input the price: 42
The Chinese form is: 肆拾贰圆整
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
void moneychange(double m)
{
char a1[][3] = {"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};
char a2[][3] = {"拾","佰",