1000至10000的英文数字

来源:百度知道 编辑:UC知道 时间:2024/05/21 12:45:39
1001 1002 1010 1011 1020 1021 1030 1031 1040 1041 1050 1051 1060 1061 1070 1071 1080 1081 1090 1091 1101 1102 1111 1112 1131 1132 1141 1142 1151 1152 1161 1162 1171 1172......1992 10000
帮帮忙啦
辛苦啦

#include<iostream>
using namespace std;
void trans999(int n);
int main()
{
int i;
cout<<"please input a integer:";
cin>>i;
if(i==0)cout<<"zero";
int thousand=i/1000;
i=i%1000;
if(thousand)
{
trans999(thousand);
cout<<" thousand ";
}
trans999(i);
return 0;
}
void trans999(int n)
{
static char *digit[10]=
{" ","one","two","three","four","five","six","seven","eight","nine"};
static char *teens[10]=
{"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eightteen","nineteen"};
static char*ties[10]=
{" "," ","twenty","thirty&