第十三周oj平台项目三:统计元音字母
2014-11-25 16:13
190 查看
#include <iostream> #include<cstdio> using namespace std; int main() { char str[100]; int X=0,A=0,E=0,I=0,O=0,U=0; gets(str); while(str[X]!='\0') { if(str[X]=='a')A++; else if(str[X]=='e')E++; else if(str[X]=='i')I++; else if(str[X]=='o')O++; else if(str[X]=='u')U++; X++; } cout<<"a:"<<A<<endl; cout<<"e:"<<E<<endl; cout<<"i:"<<I<<endl; cout<<"o:"<<O<<endl; cout<<"u:"<<U<<endl; return 0; }
相关文章推荐
- 第十三周oj平台项目二
- 第13周 OJ平台(统计每个元音字母在字符串中出现的次数)
- 第十三周 oj平台 统计元音字母个数
- 第十三周OJ平台(3):统计元音字母个数
- 文本项目系列[2]——字符串元音字母次数统计
- 第十三周 OJ平台 C:统计元音字母个数
- 第十三周OJ项目3统计元音字母个数
- [一天一项目]统计元音字母
- 第十三周OJ项目统计每个元音字母在字符串中出现的次数。
- 第十三周 OJ平台-统计元音字母个数
- 第十三周oj平台项目三
- 第十三周OJ项目统计元音字母个数
- 第十三周OJ项目c:统计元音字母个数
- 第十三周OJ平台(3)统计元音字母个数
- 第十三周 OJ平台统计元音字母个数
- 第十三周oj平台项目一:逆序输出数
- 第十三周项目五 字符串操作(统计字母A出现的次数)
- 第十三周项目 5 字符串操作(字符统计)——统计其中大小写字母的个数
- 第十三周项目5-字符串的操作(统计字母 ' A ' 出现的次数)
- 第13周Problem C: 统计元音字母个数