1005. Spell It Right (20)
来源:互联网 发布:java网上订餐系统 编辑:程序博客网 时间:2024/06/17 14:21
#include"stdio.h"int main(){int a=0,c=0;char str1[120];gets(str1);while(str1[a]!='\0'){ c=c+str1[a]-'0'; a++;}int i=0;char str[120];if(c==0) printf("zero");while(c){ a=c%10; str[i]=a+'0'; i++; str[i]=' '; i++; c=c/10;}i-=2;while(i>-1){ switch(str[i]){ case '1':printf("one");break; case '2':printf("two");break; case '3':printf("three");break; case '4':printf("four");break; case '5':printf("five");break; case '6':printf("six");break; case '7':printf("seven");break; case '8':printf("eight");break; case '9':printf("nine");break; case '0':printf("zero");break; default:printf(" ");break; } i--;} getchar();getchar();return 0;}
0 0
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- 1005. Spell It Right (20)
- C#56课的主要内容
- 425.Letter Combinations of a Phone Number-电话号码的字母组合(中等题)
- java 集合框架-AbstractCollection
- pthread多线程编程
- c++中的左值和右值
- 1005. Spell It Right (20)
- 接收数据,并显示,代码解释
- 现代操作系统学习笔记-调度
- FragmentTabHost的使用
- Windows 下安装 xgboost for python
- 使用poi对Excel表的写入修改,再导出
- 线性表的链式存储结构
- 细说Redis监控和告警
- 传球游戏