编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习3
#include <iostream>
using namespace std;
void showmenu(void)
{
cout<<"Please enter one of the following choices:\n"
"c) carnivore p) pianist\n"
"t) tree g) game\n";
}
void ak(void)
{
cout<<"Please enter a c,p,t, or g:";
}
int main()
{
char input;
showmenu();
cin>>input;
while(input)
{
switch(input)
{
case 'c':cout<<"Ad is a carniore.";
break;
case 'p':
cout<<"Lynn is a pianist.";
break;
case 't':
cout<<"A maple is a tree.";
break;
case 'g':
cout<<" Swim is a game.";
break;
default:
ak();
}
//showmenu();
cin>>input;
}
system("pause");
return 0;
}
编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习3的更多相关文章
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习9
#include <iostream> #include <fstream> #include <cstdlib> #include <string> ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习8
#include <iostream> #include <fstream> #include <cstdlib> const int SIZE=20; using ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习7
#include <iostream> #include <string> #include <cctype> using namespace std; int m ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习6
#include <iostream> #include <string> using namespace std; const int MSIZE=100; struct j ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习5
#include <iostream> using namespace std; const double N1=35000; const int N2=15000; const int ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习4
#include <iostream> using namespace std; const int strsize=30; const int BOPSIZE=5; void showm ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习2
#include <iostream> #include <cctype> using namespace std; const int MAXSIZE=10; int mai ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第6章编程练习1
#include <iostream>#include <cctype>using namespace std;int main(){ char ch; while((ch=c ...
- 编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习9
#include <iostream>using namespace std;int main(){ int num; cout<<"Enter number of ...
随机推荐
- 任意模数NTT学习笔记
这两天有点颓,所以东西学的也很慢...这个一眼就能推出来的活生生卡了我两天.. 说几个细节: 柿子: \[f*g = (\frac{f}{M} +f\%m)*(\frac{g}{M} +g\%m) \ ...
- CMDB资产管理系统开发【day26】:linux客户端开发
客户端疑难点及获取流程 1.linux客户端支持2就可以,python3就是很麻烦 难道你要求所有的客户端都上pytho3吗? 现在从bin的入口进去 HouseStark.ArgvHandler(s ...
- [再寄小读者之数学篇](2014-06-27 向量公式: The Hall term)
$$\bex \n\cdot{\bf b}=0\ra \n\times [(\n\times {\bf b})\times {\bf b}]=\n\times [\n\cdot ({\bf b}\ot ...
- [再寄小读者之数学篇](2014-05-27 矩阵的迹与 Jacobian)
(from MathFlow) 设 $A=(a_{ij})$, 且定义 $$\bex \n_A f(A)=\sex{\cfrac{\p f}{\p a_{ij}}}. \eex$$ 试证: (1) $ ...
- VIM --使用进阶 -- 插件篇 -- YouCompleteMe -- nerdtree
系统:ubuntu: 资源:https://github.com/ 其他:想了解都要哪些好用的插件,推荐大家读 http://blog.csdn.net/mergerly/article/detail ...
- 封装ajax,让调用变得简单优化
思考一下: 通常我们在使用ajax来发送接口请求时,每一次都会调用ajax固定的元素,比如data.url.method.success.error等.那么我们想一下能不能先把ajax封装起来,在每次 ...
- 编译Android ROM环境搭建
环境搭建 1 安装ubuntu 推荐12.04或13.10 2 安装jdk7和一些所需要的包安装jdk7$ sudo apt-get update$ sudo apt-get install open ...
- 设计模式九: 观察者模式(Observer Pattern)
简介 观察者属于行为型模式的一种, 又叫发布-订阅模式. 如果一个对象的状态发生改变,依赖他的对象都将发生变化, 那么这种情况就适合使用观察者模式. 它包含两个术语,主题(Subject),观察者(O ...
- Spring系列(五) 容器初始化过程源码
IoC/DI 的概念 容器是Spring的核心之一(另一个核心是AOP). 有了容器, IOC才可能实现. 什么使IoC? IoC就是将类自身管理的与其由依赖关系的对象的创建/关联和管理交予容器实现, ...
- css3之border-radius理解
在日常项目过程中,border-radius这个属性算是非常常用的属性之一了,通过设置元素的border-radius值,可以轻松给元素设置圆角边框,甚至实现绘制圆.半圆.四分之一的圆等各种圆角图形. ...