怎样用C语言将数字后面的小数点和后面的数用英文表示出来#includevoid main(){char *Eng1[20]={"zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen"
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/03 01:33:15
怎样用C语言将数字后面的小数点和后面的数用英文表示出来#includevoid main(){char *Eng1[20]={"zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen"
怎样用C语言将数字后面的小数点和后面的数用英文表示出来
#include
void main()
{char *Eng1[20]={"zero","one","two","three","four","five","six","seven",
"eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen",
"sixteen","seventeen","eighteen","nineteen"};
char *Eng2[8]={"twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"};
int num;
printf("请输入数字:");
scanf("%d",&num);
printf("对应的英文为:");
if(num>=0&&num
怎样用C语言将数字后面的小数点和后面的数用英文表示出来#includevoid main(){char *Eng1[20]={"zero","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen"
这还不简单,首先是一个浮点数,再就是必须清楚读到小数点几位
输入的话用字符型存储就ok了,0-9和小数点分别对应相应英文用字符数组存储
例如2.3330就读two point three three three zero就可以了