5.9

来源:互联网 发布:评价金庸小说 知乎 编辑:程序博客网 时间:2024/04/30 14:59
#include<iostream>#include<vector>#include<string>using namespace std;int main(){unsigned acnt = 0, ecnt = 0, icnt = 0, ocnt = 0, ucnt = 0;char ch;while (cin >> ch){if (ch == 'a')++acnt;else if (ch == 'e')++ecnt;else if (ch == 'i')++icnt;else if (ch == 'o')++icnt;else if (ch == 'u')++ucnt;}cout << acnt << '\n' << ecnt << '\n' << icnt << '\n' << ocnt << '\n' << ucnt << endl;return 0;}

0 0
原创粉丝点击