第2章 13
来源:互联网 发布:衣服搭配软件 编辑:程序博客网 时间:2024/04/28 23:59
#include <stdio.h>
#include <stdlib.h>
int main()
{
int x=0,y=0;
char ch;
while((ch=getchar())!='*')
{
if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
{
x++;
}
else if(ch>='0'&&ch<='9')
{
y++;
}
}
printf("字母有%d个\n数字有%d个\n",x,y);
return 0;
}
#include <stdlib.h>
int main()
{
int x=0,y=0;
char ch;
while((ch=getchar())!='*')
{
if((ch>='a'&&ch<='z')||(ch>='A'&&ch<='Z'))
{
x++;
}
else if(ch>='0'&&ch<='9')
{
y++;
}
}
printf("字母有%d个\n数字有%d个\n",x,y);
return 0;
}
0 0
- 第2章 13
- 读第3章第1第2节-2011.2.13
- 第2章 vector和string 第13条 第14条
- 第1章 第13题
- 读书笔记 《第一行代码》 第13章
- 第2章第2题
- 第2章 第2题
- 第2章第2节 队列
- 第2章第3题
- 第2章第4题
- 第2章第5题
- 第2章第6题
- 第2章 第3题
- 第2章 第4题
- 第2章 第5题
- 第2章 第6题
- 第4章 第2题
- 第5章 第2题
- 每天进步一点点——Linux中的线程局部存储(一)
- joptsimple.UnrecognizedOptionException: 'broker-list120.24.66.173:9092' is not a recognized option
- 自动色阶、自动对比度算法实现
- Vim命令合集
- Ext.grid.GridPanel |属性|方法|配置|详细介绍
- 第2章 13
- vi操作(E297错误),修改配置信息提示couldn't flush
- ASCII、Unicode、GBK和UTF-8字符编码的区别联系
- 123页36题
- iOS日常所得
- Full Text Search
- EF应用CodeFirst模式,数据迁移的基本用法要点摘记
- python学习笔记——文本文件(ascall)与十六进制字符串的转换
- 对CoreGraphics和QuartzCore的理解