编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习2
#include <iostream>
using namespace std;
const int MAXSIZE=100;
int main()
{
int a[MAXSIZE];
int sum=0;
for(int i=0;i<MAXSIZE;i++)
{
cin>>a[i];
if(a[i]==0)
return 0;
sum=sum+a[i];
cout<<"sum= "<<sum;
}
system("pause");
return 0;
}
编程菜鸟的日记-初学尝试编程-C++ Primer Plus 第5章编程练习2的更多相关文章
- 编程菜鸟的日记-初学尝试编程-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 ...
随机推荐
- windows解压.tar00文件
通常是单个文件太大分拆出来的,例如data.tar00, data.tar01, data.tar02等 cmd命令行进入几个tar0x文件所在目录,执行: copy /b data.tar0* da ...
- https://www.cnblogs.com/zoro-robin/p/6110188.html
https://www.cnblogs.com/zoro-robin/p/6110188.html https://blog.csdn.net/kongxx/article/details/65435 ...
- js调试console.log使用总结图解
一 实例 打印字符串和对象: 可展开对象查看内部情况: 看一下console对象本身的定义情况: 输出对象情况: utag对象所在文件: 输出对象: 二 Console.log 总结 1 如果你j ...
- Html列表分页算法
public class PageHelper { /// <summary> /// 标签 /// </summary> public string Tag { get; s ...
- SpringBoot学习(3)-SpringBoot添加支持CORS跨域访问
SpringBoot学习(3)-SpringBoot添加支持CORS跨域访问 https://blog.csdn.net/yft_android/article/details/80307672
- 源码编译安装net-snmp
https://blog.csdn.net/u013992330/article/details/79712405 https://wenku.baidu.com/view/24368a2257125 ...
- linux下几个常用软件
Ubuntu 软件包地址 https://packages.ubuntu.com/ 一. 字体 不管是雅黑还是宋体,从windows cp过来后, 直接双击打开并安装 二. Meld 可视的diff和 ...
- You have new mail in /var/spool/mail/root消除提示的方法
有时在进入系统的时候经常提示You have new mail in /var/spool/mail/root 你觉得烦人---解决方法: 修改系统配置文件/etc/profile,告诉系统不要去检查 ...
- 2018牛客网暑假ACM多校训练赛(第五场)F take 树状数组,期望
原文链接https://www.cnblogs.com/zhouzhendong/p/NowCoder-2018-Summer-Round5-F.html 题目传送门 - https://www.no ...
- BZOJ1096 [ZJOI2007]仓库建设 动态规划 斜率优化
原文链接http://www.cnblogs.com/zhouzhendong/p/8696410.html 题目传送门 - BZOJ1096 题意 给定两个序列$a,b,X$,现在划分$a$序列. ...