数字和字母的转换的程序

问题描述:

数字和字母的转换的程序
写一个叫num的程序...读或者写十进制被指定是阿拉伯数字或者是英文字母的号码..程序要一直从标准输入里读再写标准输出直到所有输入都进行了...
1.转换 数字 into 字母 for numbers less than 10.
input output
5 five
0 zero
2.转换 数字 into 字母 for numbers less than or equal to 20.
input output
15 fifteen
12 twelve
3.转换 小写字母 into numerals for numbers less than or equal to 20.
input output
fifteen 15
eight 8
4.对于输入的字母是不敏感的
input output
FIFTEEN 15
EiGhT 8
5.转换 numerals into words for numbers less than 1000.
input output
921 nine hundred twenty one
901 nine hundred one
6.转换 字母 为 数字 for numbers less than 1000.
input output
two hundred fifty six 256
one hundred eleven 111
7.如果输入了不可用的数据则输出一个错误的信息..
input output
hello world invalid input
3 hundred invalid input
%@ invalid input
希望会的人能写一个完整的例子出来...
1个回答 分类:综合 2014-11-10

问题解答:

我来补答
你很无聊厄
 
 
展开全文阅读
剩余:2000