#include <stdio.h>
#include <string.h>
int main()
{
int data;
scanf("%d", &data);
int temp = data;
int count = 0;
while (temp)
{
temp = temp / 10;
count++;
}
temp = data;
int arr[count];
int test = 1;
int i = 1;
while (temp)
{
arr[count - i] = temp % 10;
i++;
temp = temp / 10;
}
int change;
char *arr_change[10] = {"零", "一", "二", "三", "四", "五", "六", "七", "八", "九"};
char *arr_wei[10] = {"", "", "十", "百", "千", "万", "十", "百", "千", "亿"};
i = 0;
while (count)
{
printf("%s%s", arr_change[arr[i++]], arr_wei[count--]);
}
printf("\n");
return 0;
}
阿拉伯数字转化为大写汉字
最新推荐文章于 2024-06-11 15:34:13 发布