#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. MS16-032提权正确方法

    原版MS16-032提权会Spawn一个System Shell出来,只能通过Remote Desktop获取.这里修改exploit,直接反弹Shell.注意MS16-032依赖 thread ha ...

  2. python—RE正则表达式

    re正则表达式 正则表达式(或 RE)是一种小型的.高度专业化的编程语言,(在Python中)它内嵌在Python中,并通过 re 模块实现.正则表达式模式被编译成一系列的字节码,然后由用 C 编写的 ...

  3. vue路由-动态路由和嵌套路由

    一.动态路由 我们经常需要把某种模式匹配到的所有路由,全都映射到同个组件.例如,我们有一个 User 组件,对于所有 ID 各不相同的用户,都要使用这个组件来渲染.那么,我们可以在 vue-route ...

  4. CSS浮动和清除

    float:让元素浮动,取值:left(左浮动).right(右浮动) clear:清除浮动,取值:left(清除左浮动).right(清除右浮动).both(同时清除上面的左浮动和右浮动) 1.CS ...

  5. centos_7.1.1503_src_4

    http://vault.centos.org/7.1.1503/os/Source/SPackages/ libkcompactdisc-4.10.5-3.el7.src.rpm 05-Jul-20 ...

  6. 简单的自动化运维工具(shell+except+whiptail+功能模块化函数+循环)

    简单的自动化运维工具(shell+except+whiptail+功能模块化函数+循环) http://www.cnblogs.com/M18-BlankBox/p/5881700.html

  7. BZOJ 2002: [Hnoi2010]Bounce 弹飞绵羊 动态树

    题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=2002 题意:加边,删边,查询到根的距离. #include <bits/stdc++ ...

  8. Jquery屏蔽浏览器的F1-F12快捷键,在IE,GOOGLE下测试均无问题

    在网上找了找,很多都是js实现的,东找西找,再加上自己的想法也勉强的完成了,直接看代码 <script type="text/javascript" src="Sc ...

  9. Android UI 设计:pixel dip dpi sp density

    1. px (pixels)像素 – 是像素,就是屏幕上实际的像素点单位. dip或dp (device independent pixels)设备独立像素,与设备屏幕有关. sp (scaled p ...

  10. MYSQL中INET_ATON()函数

    例如我们现在要在一个表中查出 ip 在 192.168.1.3 到 192.168.1.20 之间的 ip 地址,我们首先想到的就是通过字符串的比较来获取查找结果,但是如果我们通过这种方式来查找,结果 ...