求一个简单的c++程序,将数字转换为英文单词 数字范围为-20亿到20亿Integer to English number conversionWrite a program that takes an integer and displays the English name of that value.You should support both positive and negativ
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/26 11:11:21
求一个简单的c++程序,将数字转换为英文单词 数字范围为-20亿到20亿Integer to English number conversionWrite a program that takes an integer and displays the English name of that value.You should support both positive and negativ
求一个简单的c++程序,将数字转换为英文单词 数字范围为-20亿到20亿
Integer to English number conversion
Write a program that takes an integer and displays the English name of that value.
You should support both positive and negative numbers,in the range supported by a 32-bit integer (approximately -2 billion to 2 billion).
Examples:
10 -> ten
121 -> one hundred twenty one
1032 -> one thousand thirty two
11043 -> eleven thousand forty three
#include
求一个简单的c++程序,将数字转换为英文单词 数字范围为-20亿到20亿Integer to English number conversionWrite a program that takes an integer and displays the English name of that value.You should support both positive and negativ
#include
using namespace std;
void output0to19(int num)
{
switch(num)
{
case 0:break;
case 1:cout