编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习7
#include <iostream>
#include <cstring>
const MAXSIZE=100;
using namespace std;
int main ()
{
char words[MAXSIZE];
int i=0;
cout<<"Enter words (to stop, type the word done):\n";
(cin>>words).get();
while(strcmp(words,"done"))
{
i++;
(cin>>words).get();
}
cout<<"You entered a total of "<<i<<" words.";
system("pause");
return 0;
}
编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习7的更多相关文章
- 编程菜鸟的日记-初学尝试编程-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章编程练习3
#include <iostream> using namespace std; void showmenu(void) { cout<<"Please enter ...
- 编程菜鸟的日记-初学尝试编程-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 ...
随机推荐
- FreeNAS插件打造ownCloud私有云网盘
ownCloud 是一个自由开源的个人云存储解决方案,可以自由获取无需付费,但用户需要自行架设服务器,好在FreeNAS可以通过插件轻松的构建ownCloud服务器. ownCloud 分为服务器端和 ...
- 利用DOS命令窗口进行Mail通信(二)
一:SMTP协议(对邮件进行发送) <SP>代表空格,<CRLF>代表回车和换行 SMTP命令格式 说明 ehlo<SP><domain><CRL ...
- IDEA配置注释模板
直接进入主题: Ctrl+Alt+S进入设置界面(我没改过按键映射,你也可以从File-OtherSetting进入设置),找到Editor->File and Code Templates,先 ...
- 【1】JDK8 HashMap扩容优化
JDK1.7 VS JDK1.8 比较 优化概述: resize 扩容优化 引入了红黑树,目的是避免单条链表过长而影响查询效率 解决了resize时多线程死循环问题,但仍是非线程安全的 这里主要讲讲扩 ...
- JWT入门简介
官网:https://jwt.io/ 文档:https://jwt.io/introduction/ 目录 什么是JWT 头部(Header) 载荷(Payload) 签名(Signature) JW ...
- [物理学与PDEs]第5章习题6 各向同性材料时强椭圆性条件的等价条件
在线性弹性时, 证明各向同性材料, 强椭圆性条件 (5. 6) 等价于 Lam\'e 常数满足 $$\bex \mu>0,\quad \lm+2\mu>0. \eex$$ 证明: (1) ...
- Gram 矩阵与向量到子空间的距离
设 $W$ 是 $n$ 维 Euclidean 空间 $V$ 的子空间, $\beta\in V$, 定义 $\beta$ 到 $W$ 的距离 $$\bex \rd (\beta,W)=|\bet ...
- Codeforces 1096F(dp + 树状数组)
题目链接 题意: 对于长度为$n$的排列,在已知一些位的前提下求逆序对的期望 思路: 将答案分为$3$部分 $1.$$-1$与$-1$之间对答案的贡献.由于逆序对考虑的是数字之间的大小关系,故假设$- ...
- 逻辑运算符、位运算符、三元运算符、判断语句(if,switch)
逻辑运算符 逻辑与 &:由false则false 逻辑或 |:有true则true 逻辑异或 ^:相同为false,不同为true 逻辑非 !:非false则true,非true则false ...
- djang增删改查
创建表: from django.db import models class Publisher(models.Model): pid = models.AutoField(primary_key ...