编程菜鸟的日记-初学尝试编程-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 ...
随机推荐
- NOI-OJ 1.13 ID:34 确定进制
整体思路 对于任意的p,q,r,可能使得p*q=r的最小进制应该是p,q,r三个数的所有数位中最大的数字+1,例如,6,9,42三个数中所有数位中最大的数字是9,故可能成立的最小进制是9+1,即10. ...
- 纯css美化下拉框、复选框以及单选框样式并用jquery获取到其被选中的val
具体样式如图所示: 注:获取val值时记得要先引入jquery库奥. 1.下拉框 css部分 #cargo_type_id{ font-size: 13px; border: solid 1px #b ...
- react-router(v4) 路由跳转后返回页面顶部问题
遇到的问题 由A页面跳转到B页面,B页面停留在A页面的位置,没有返回到顶部. 问题分析 首先分析下出现此问题的原因: 在项目中使用的是 hashHistory,它是建立在 history 之上的,当路 ...
- Educational Codeforces Round 52 (Rated for Div. 2)
题目链接 A. Vasya and Chocolate 题意 已知钱,价格,赠送规则求最多获得巧克力数 思路常规算即可 代码 #include <bits/stdc++.h> #defin ...
- JAVA进阶4
间歇性混吃等死,持续性踌躇满志系列-------------第4天 1.静态内部类求极值 class MaxMin{ public static class Result{ //表示最大值.最小值 p ...
- 关于模拟I2C的一些问题???
1.在调试BH1750时发现stm32f103rb单片机用模拟I2C通讯时引脚使用开漏模式能正常读出来数据,使用推挽模式则完全无法通讯,发送地址后从机没有应答? https://blog.csdn.n ...
- mybatis源码笔记
mybatis设计总览 目录结构: 通过配置文件,获取SqlSessionFactory XMLConfigBuilder 解析配置文件,获取SqlSessionFactory private sta ...
- webstorm javascript 分号提示如何自动补全或去掉?
转载于: https://segmentfault.com/q/1010000006930809?_ea=1180552 如图片显示,每行末尾都会提示你加上分号,如何让IDE自动完成这个操作或者取消这 ...
- HTTP协议12-HTTPS
1)HTTP的缺点 通信使用明文(不加密),内容可能会被窃听 不验证通信方的身份,因此有可能遭遇伪装 无法证明报文的完整性,所有有可能已被篡改 1.1 通信使用明文可能会被窃听 由于HTTP本身不具备 ...
- JdbcTemplate中queryForObject方法返回空结果或不正确结果数量的解决方法
在使用Spirng提供的JdbcTemplate中名为queryForObject API进行数据库查询时有时会抛出如下异常: org.springframework.dao.EmptyResultD ...