![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++ Primer Plus编程练习
LudoArtificis
还在努力学习的游戏制作者
展开
-
第八章 函数探幽
2、#include <iostream>using namespace std;struct CandyBar{ char *name; double weight; int hot;};void Set(CandyBar &candy, const char *c = "Milennium Munch", const double &w =...原创 2018-08-31 17:26:16 · 144 阅读 · 0 评论 -
第七章 函数——C++的编程模块
1、#include <iostream>using namespace std;double HarmonicMean(const double &x, const double &y);int main(){ double x, y; cin >> x >> y; //输入两个数,直到其中一个为0结束程序 while...原创 2018-09-01 19:55:40 · 291 阅读 · 0 评论 -
第六章 分支语句和逻辑运算符
1、#include <iostream>#include <cctype>using namespace std;/*1、读取键盘输入,遇到@符号为止2、回显输入(数字除外)3、将大写改为小写,小写改为大写*/int main(){ char c[100]; int n = 0; while (cin >> c[n]) { ...原创 2018-09-03 09:37:48 · 213 阅读 · 0 评论