有符号整数(int)的汉语读法。

您所在的位置:网站首页 整数integer的读法 有符号整数(int)的汉语读法。

有符号整数(int)的汉语读法。

2024-07-10 13:07| 来源: 网络整理| 查看: 265

有符号整数(int)的汉语读法。 发布时间:2020-07-21 12:42:51 来源:网络 阅读:940 作者:碍人i 栏目:编程语言

        

请实现一个函数,给定一个32为有符号整数(int 类型),函数输出该数字符合汉语习惯的读法。例如:10086 读作 " 一万零八十六"。

#include #include #include #include #include using namespace std; void m_itoa(int num,list &vt) {     int n=num;      if(num0)     {         vt.push_front(n%10+'0');         n/=10;     } } int main() {     string n1[]={"零","一","二","三","四","五","六","七","八","九"};     string n2[]={"个","十","百","千","万","十","百","千","亿","十"};     int num;     cin>>num;     if(num


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3