#include<stdio.h>
#include<string.h>
int main(){
char str[];
while(gets(str)!=NULL){
int a=,b=,c=,d=;
for(int i=;str[i]!='\0';i++){
if((str[i]>='a'&&str[i]<='z')||(str[i]>='A'&&str[i]<='Z')){
a++;
}
else if(str[i]>=''&&str[i]<=''){
b++;
}
else if(str[i]==' '){
c++;
}
else{
d++;
}
}
printf("%d %d %d %d\n",a,b,c,d);
}
return ;
}

Problem F: 零起点学算法101——统计字母数字等个数的更多相关文章

  1. 武汉科技大学ACM :1003: 零起点学算法67——统计字母数字等个数

    Problem Description 输入一串字符,统计这串字符里的字母个数,数字个数,空格字数以及其他字符(最多不超过100个字符) Input 多组测试数据,每行一组 Output 每组输出一行 ...

  2. Problem F: 零起点学算法85——数组中插入一个数

    #include<stdio.h> int main() { ],b[]; while(scanf("%d",&n)!=EOF) { ;i<n;i++) ...

  3. Problem F: 零起点学算法42——多组测试数据输出II

    #include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...

  4. Problem K: 零起点学算法107——统计元音

    #include<stdio.h> int main() { int n; ]; while(scanf("%d%*c",&n)!=EOF) { while(n ...

  5. Problem G: 零起点学算法106——首字母变大写

    #include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...

  6. 武汉科技大学ACM :1005: 零起点学算法101——手机短号

    Problem Description 大家都知道,手机号是一个11位长的数字串,同时,作为学生,还可以申请加入校园网,如果加入成功,你将另外拥有一个短号.假设所有的短号都是是 6+手机号的后5位,比 ...

  7. Problem Y: 零起点学算法21——摄氏温度转换

    #include<stdio.h> int main() { float f,c; while(scanf("%f",&f)!=EOF) c=*(f-); pr ...

  8. Problem X: 零起点学算法22——华氏摄氏温度转换

    #include<stdio.h> int main() { float f,c; while(scanf("%f",&f)!=EOF) c=*(f-); pr ...

  9. Problem O: 零起点学算法10——求圆柱体的表面积

    #include<stdio.h> int main() { float r,h,pi; pi=3.1415926; scanf("%f %f",&r,& ...

随机推荐

  1. TensorFlow中get_variable共享变量调用

    import tensorflow as tf with tf.variable_scope('v_scope',reuse=True) as scope1: Weights1 = tf.get_va ...

  2. Centos7编译安装Xen环境(vtpm)

    编译xen环境(http://www.lvtao.net/server/574.html#comment-1882): yum update yum groupinstall "Develo ...

  3. python基础===python实现截图

    python实现全屏截图: from PIL import ImageGrab im = ImageGrab.grab() im.save('F:\\12.png')

  4. 【UOJ224】短路

    具体可以看UOJmyy的blog,orz 就是一个贪心. #include<bits/stdc++.h> typedef long long ll; using namespace std ...

  5. HDU 6115 Factory LCA,暴力

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6115 题意:中文题面 分析:直接维护LCA,然后暴力枚举集合维护答案即可. #include < ...

  6. 获取file中字段,写入到TXT文件中

    一下代码省略了很多,哈哈哈 a.txt文件 uid,type,pointx,pointy,name1,9,911233763,543857286,区间测速起点3,9,906371086,5453354 ...

  7. tomcat8特性

    作者:Eilen,转载需注明.博客主页:http://www.cnblogs.com/Eilen/ 一.Apache Tomcat 8介绍 Apache Tomcat 8RC1版于前几日发布.它 经过 ...

  8. RSA加密解密与加签验签

    RSA公钥加密算法是1977年由罗纳德·李维斯特(Ron Rivest).阿迪·萨莫尔(Adi Shamir)和伦纳德·阿德曼(Leonard Adleman)一起提出的.1987年7月首次在美国公布 ...

  9. [ Python ] set集合及函数的使用

    1. set类型 set 和 dict 类似,也是一组 key 的集合,但是不存储 value. 由于 key  不重复,所以,在 set 中, 没有重复的 key 集合是可变类型 (1)集合的创建 ...

  10. C#面向对象(OOP)入门—第一天—多态和继承(方法重载)

    面向对象是什么 面向对象是一种基于对象的编程方法,它取代了仅仅依靠方法和流程的编程方式.面向对象的编程语言中,对象(object)其实就是指特定类型.或某个类的实例.面向对象使得编程人员更容易组织和管 ...