#include <iostream>
#include <string>
#include <cctype>
using namespace std;
int main()
{
string words;
int yy=0;
int fy=0;
int other=0;
cout<<"Enter words (q to quit):\n";
while(cin>>words)
{
if(isalpha(words[0]))
{
if(words[0]=='q' && (words.size())==1)
break;
else
{
switch(words[0])
{
case 'a':
case 'o':
case 'e':
case 'i':
case 'u':
yy++;
break;
default:fy++;
}
}
}
else
other++;
}
cout<<yy<<" words beginning with vowels"<<endl;
cout<<fy<<" words beginning with consonants"<<endl;
cout<<other<<" others"<<endl;
system("pause");
return 0;
}

编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习7的更多相关文章

  1. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习9

    #include <iostream> #include <fstream> #include <cstdlib> #include <string> ...

  2. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习8

    #include <iostream> #include <fstream> #include <cstdlib> const int SIZE=20; using ...

  3. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习6

    #include <iostream> #include <string> using namespace std; const int MSIZE=100; struct j ...

  4. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习5

    #include <iostream> using namespace std; const double N1=35000; const int N2=15000; const int ...

  5. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习4

    #include <iostream> using namespace std; const int strsize=30; const int BOPSIZE=5; void showm ...

  6. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习3

    #include <iostream> using namespace std; void showmenu(void) { cout<<"Please enter ...

  7. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习2

    #include <iostream> #include <cctype> using namespace std; const int MAXSIZE=10; int mai ...

  8. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习1

    #include <iostream>#include <cctype>using namespace std;int main(){ char ch; while((ch=c ...

  9. 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习9

    #include <iostream>using namespace std;int main(){ int num; cout<<"Enter number of ...

随机推荐

  1. JDK8源码阅读之Collection及相关方法

    最近面试总会被问到JDK8中的一些新特性,所以闲下来抽时间看了一下8的源码,目前主要看的是数据结构部分,特此记录一下. 新增函数式接口,实现该接口的可以直接用lambda表达式. default和st ...

  2. Ubuntu版本linux系统安装git

    可以使用apt-get方式安装,也可以下载源代码安装,我们这里使用apt-git安装.但由于直接使用 sudo apt-get install git 安装的版本较老,因此我们参考[2]中给出的PPA ...

  3. 07binlog日志介绍

    设置日志格式为row 创建数据库和表 mysql> create database chinasoft charset=utf8mb4; mysql> use chinasoft; mys ...

  4. char *p[] 和char**的思考

    char *p[] = {"hello","world"}; char **pp; pp = p; printf("%s,%s\n",*pp ...

  5. 【DOS】Win7系统文件夹名太长无法删除问题的解决

    一个测试工具产生了几个坑爹文件夹名为n个“x” ,系统提示删除不掉. 网上百度,说什么压缩.写bat文件...统统没用. 猛地看到右击菜单中安装了git客户端工具,想试试看.在该文件夹目录下Git B ...

  6. vertx的NetServer模块

    启动 public synchronized void listen(Handler<NetSocket> handler, SocketAddress socketAddress, Ha ...

  7. 自定义admin组件

    配置路由 1 新建一个项目, 创建一个app01和stark应用,stark创建一个service包,并在service下创建stark.py.然后注册app 2 仿照site.py的注册代码,写st ...

  8. oracle 启动三步骤

    oracle 启动三步骤 oracle启动会经过三个过程,分别是nomount.mount.open 一.nomount 阶段 nomount 阶段,可以看到实例已经启动.oracle进程会根据参数文 ...

  9. PHP将图片转base64编码以及base64图片转换为图片并保存代码

    图片转base64编码 /*图片转换为 base64格式编码*/ $img = 'uploads/01.png'; $base64_img = base64EncodeImage($img); ech ...

  10. IBOS云办公系统二次开发之功能介绍(PHP技术)

    IBOS自动化办公系统是我见到的功能.架构最好的开源自动化办公系统,功能与企业需求吻合度之高.架构之灵活,让我不得不将之介绍给大家,让跟多需要学习PHP开发的朋友来了解她,拥抱她! 如果您还没有很好的 ...