hdoj 2027
来源:互联网 发布:visual c#是c语言吗 编辑:程序博客网 时间:2024/05/29 18:46
#include<iostream>
using namespace std;
int main(void)
{
int n;
char s[100];
cin >> n;
getchar();
for (int j = 0; j < n; j++)
{
if (j > 0) cout << endl;
int a[5] = { 0, 0, 0, 0, 0 };
gets(s);
for (int i = 0; i < strlen(s); i++)
{
if (s[i] == 'a') a[0]++;
else if (s[i] == 'e') a[1]++;
else if (s[i] == 'i') a[2]++;
else if (s[i] == 'o') a[3]++;
else if (s[i] == 'u') a[4]++;
}
cout << 'a' << ":" << a[0] << endl;
cout << 'e' << ":" << a[1] << endl;
cout << 'i' << ":" << a[2] << endl;
cout << 'o' << ":" << a[3] << endl;
cout << 'u' << ":" << a[4] << endl;
}
return 0;
}
using namespace std;
int main(void)
{
int n;
char s[100];
cin >> n;
getchar();
for (int j = 0; j < n; j++)
{
if (j > 0) cout << endl;
int a[5] = { 0, 0, 0, 0, 0 };
gets(s);
for (int i = 0; i < strlen(s); i++)
{
if (s[i] == 'a') a[0]++;
else if (s[i] == 'e') a[1]++;
else if (s[i] == 'i') a[2]++;
else if (s[i] == 'o') a[3]++;
else if (s[i] == 'u') a[4]++;
}
cout << 'a' << ":" << a[0] << endl;
cout << 'e' << ":" << a[1] << endl;
cout << 'i' << ":" << a[2] << endl;
cout << 'o' << ":" << a[3] << endl;
cout << 'u' << ":" << a[4] << endl;
}
return 0;
}
阅读全文
0 0
- HDOJ-2027
- HDOJ 2027
- HDOJ--2027
- hdoj 2027
- hdoj 2027 统计元音
- hdoj 2027 统计元音
- HDOJ 2027 单词数
- HDOJ 2027 统计元音
- HDOJ 2027 统计元音
- HDOJ 2027 统计元音
- HDOJ 2027 统计元音
- HDOJ 2027 统计元音
- HDOJ
- hdoj
- hdoj
- HDOJ
- hdoj.2027 统计元音 20140726
- hdoj 2027 统计元音 C++
- Asp.net MVC中使用JQuery插件ajaxFileUpload上传文件
- hdoj 2026
- es与kibana插件安装
- 图像频谱图
- C语言——确定某数比特位中1的个数并打印其32位比特数值
- hdoj 2027
- Gerrit FAQ
- 如何选择深度学习优化器
- 【简记】Computer Networking——application layer(part one)
- git push 问题:committer 'xxx (x)' does not match your user account
- 25. 编写一个函数,将一个字符串中的非原音字母赋值到另一个字符串中
- BZOJ 2081 [Poi2010] Beads
- Fedora 25 相关配置
- 【框架整合】三、整合mybatis