如何在C中将int转换为字符串中的负数和正数?

问题描述:

我无法将负数转换为c中的单词。

喜欢

输入= -123046

输出=减去一个二十三万四千六十五。



我尝试过:



i尝试了数组字符串和函数。

i can't convert the negative numbers to word in c.
like
input= -123046
output = minus one lac twenty three thousand forty six.

What I have tried:

i tried Array string and function.

请摘一个参考来自



将给定数字转换为单词的程序 - GeeksforGeeks [ ^ ]
Please take a ref from

Program to convert a given number to words - GeeksforGeeks[^]


这是一个常见的作业问题,几年前我写了一个提示:将数字转换为等效的单词。 [ ^ ] - 它在C#中,但C代码将使用相同的原理,语法大致相同。
This is such a common homework problem that I wrote a tip on it some years ago: Converting numbers to the word equivalent. [^] - it's in C#, but the C code would use the same principles, and much the same syntax.