| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 449 人关注过本帖
标题:求教:加法的C代码
只看楼主 加入收藏
huicpc0876
Rank: 2
等 级:论坛游民
帖 子:69
专家分:50
注 册:2009-7-24
结帖率:92.59%
收藏
已结贴  问题点数:20 回复次数:4 
求教:加法的C代码
Problem description
Reads in positive integers A and B,calculates A + B.Pay attention:A and B is composed by simple English word.
[0-9]:"zero","one","two","three","four","five","six","seven","eight","nine";

 
Input
Standard input will contain multiple test cases.Each testcase occupies a line.the form is "A + B =",the neighboring two characters string has a blank space.When A and B is 0 at the same time ,inputs finished.You shouldn't output the result 0.

 
Output
For each testcase outputs 1 line,The result of A + B,by simple English word too.Each word is separated with a single space.There's no space after the last word.

 
Sample Input
one + two =
three four + five six =
zero + zero =
 
Sample Output
three
nine zero
搜索更多相关主题的帖子: 加法 代码 
2009-07-24 15:43
wxjeacen
Rank: 7Rank: 7Rank: 7
等 级:禁止访问
帖 子:1291
专家分:628
注 册:2009-3-22
收藏
得分:14 
STL 的MAP容器,直接就可以搞定了。

生命不熄,战斗不止.
2009-07-24 15:46
huicpc0876
Rank: 2
等 级:论坛游民
帖 子:69
专家分:50
注 册:2009-7-24
收藏
得分:0 
听不懂。
2009-07-25 14:59
huicpc0876
Rank: 2
等 级:论坛游民
帖 子:69
专家分:50
注 册:2009-7-24
收藏
得分:0 
听不懂。
2009-07-25 14:59
huicpc0876
Rank: 2
等 级:论坛游民
帖 子:69
专家分:50
注 册:2009-7-24
收藏
得分:0 
听不懂。
2009-07-25 14:59
快速回复:求教:加法的C代码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.043829 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved