Problem K: 零起点学算法107——统计元音
#include<stdio.h>
int main()
{
int n;
char a[];
while(scanf("%d%*c",&n)!=EOF)
{
while(n--)
{
int num1=,num2=,num3=,num4=,num5=;
gets(a);
for(int i=;a[i]!='\0';i++)
{
switch(a[i]) //在这用switch语句会比较方便
{
case 'a': num1++;break;
case 'e': num2++;break;
case 'i': num3++;break;
case 'o': num4++;break;
case 'u': num5++;break;
}
}
printf("a:%d\ne:%d\ni:%d\no:%d\nu:%d\n\n",num1,num2,num3,num4,num5);
} }
return ;
}
Problem K: 零起点学算法107——统计元音的更多相关文章
- Problem F: 零起点学算法101——统计字母数字等个数
#include<stdio.h> #include<string.h> int main(){ ]; while(gets(str)!=NULL){ ,b=,c=,d=; ; ...
- 武汉科技大学ACM :1003: 零起点学算法67——统计字母数字等个数
Problem Description 输入一串字符,统计这串字符里的字母个数,数字个数,空格字数以及其他字符(最多不超过100个字符) Input 多组测试数据,每行一组 Output 每组输出一行 ...
- Problem H: 零起点学算法109——单数变复数
#include <stdio.h> #include<string.h> int main(void) { int n; ]; scanf("%d",&a ...
- Problem G: 零起点学算法106——首字母变大写
#include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...
- Problem H: 零起点学算法103——查找最大元素
#include<stdio.h> #include<string.h> int main() { ]; while(gets(a)!=NULL) { ]; ;a[i]!='\ ...
- Problem J: 零起点学算法89——程序设计竞赛
#include<stdio.h> //选择排序法 int main(){ ]; while(scanf("%d",&n)!=EOF){ ;i<n;i++ ...
- Problem F: 零起点学算法85——数组中插入一个数
#include<stdio.h> int main() { ],b[]; while(scanf("%d",&n)!=EOF) { ;i<n;i++) ...
- Problem D: 零起点学算法95——弓型矩阵
#include<stdio.h> #include<string.h> int main() { ][]; while(scanf("%d%d",& ...
- Problem F: 零起点学算法42——多组测试数据输出II
#include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...
随机推荐
- 编写jquery Plugin
编写jquery插件的原则 1.给$.fn绑定函数,实现插件的代码逻辑 2.插件函数最后要return this,以支持链式调用 3.插件函数要有默认值,绑定在$.fn.<pluginName& ...
- Low-overhead enhancement of reliability of journaled file system using solid state storage and de-duplication
A mechanism is provided in a data processing system for reliable asynchronous solid-state device bas ...
- vs 2015 插件 supercharger 破解方式
亲测有效:效果如图 方法如下: 1.打开Supercharger的options; 2.点击Pricing & Registration 3.复制 license 然后再按Paste &am ...
- Yii 1.1.17 一、安装、目录结构、视图、控制器、扩展自定义函数
这几天了解了一下Yii框架,以简单的博客项目实战入门.大致的实现流程做个记录. 一.Yii 安装与环境检测 从 www.yiiframework.com 获取一份Yii的拷贝,解压到 /wwwroot ...
- 大公司开源网址[www]
https://github.com/blackberry https://github.com/CallForSanity?tab=repositories https://github.com/b ...
- iOS 真机调试报错汇总
1. iphone is busy: processing symbol files 引起原因第一次运行真机, 会处理一些文件, 上面会有一个进度条给予显示 等100%之后再编译 2. xcode c ...
- 微信小程序时钟(xx年xx月xx日xx:xx格式)
wxml: <view>时间:{{newTime}}</view> js: page({ data:{ newTime:'' }, onLoad: function (opti ...
- keil问题:Error: failed to execute 'C:\Keil\ARM\BIN\ArmCC'
1.打开cmd,进入相应的路径下 cd C:\Keil\ARM\BIN\ 输入 armcc 若显示如下界面则说明keil已经注册 2.若注册成功还没解决问题,则说明软件是在网上下载的破解版的,建议卸 ...
- ASP .NET CORE 部署linux 系统上的所需要的sdk 使用链接
https://www.microsoft.com/net/learn/get-started/linuxopensuse
- linux下文件查询命令(cat,more,less,head,tail)
众所周知Linux中命令cat.more.less均可用来查看文件内容,主要区别有:cat是一次性显示整个文件的内容,还可以将多个文件连接起来显示,它常与重定向符号配合使用,适用于文件内容少的情况:m ...