编程菜鸟的日记-初学尝试编程-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 ...
随机推荐
- 2017-2018-2 20165328 实验三《敏捷开发与XP实践》实验报告
一.实践-1: 要求:参考http://www.cnblogs.com/rocedu/p/6371315.html#SECCODESTANDARD安装alibaba插件,解决代码中的规范问题. 在ID ...
- Android 敏感权限申请
动态权限管理是Android6.0(Build.VERSION_CODES.M = Api23)推出的,提醒用户当前APP所需要的权限,防止滥用.这些权限一般分为三种:(1)普通权限:直接manife ...
- [转] 【Monogdb】MongoDB的日志系统
记得前几天有个小伙伴要查看mongodb的日志,从而排查问题,可能总找不到日志放在何处,今天就系统说一下mongodb的日志系统.mongodb中主要有四种日志.分别是系统日志.Journal日志.o ...
- PHP微信模板消息发送
<?php class Wxtemplate extends Base { function __construct() { $this->appid = config('WXAPP_AP ...
- 清北合肥day2-day5
day2:215这一天的题目相对比较模板化t1:50看错了数据范围求n个点到给出的点哈夫曼距离的最小值我想到的是一种非常zz的做法我们二分答案,然后判断是否在这个距离内有点但是这样前缀和不是很好维护于 ...
- centos 6.5升级内核到3.1
1.查看本机内核版本 [root@localhost ~]# uname -r 2.6.32-358.el6.x86_64 2.安装含有内核软件的源 步骤一:导入证书 [root@localhost ...
- js中slice splice substring substr区别
https://www.jb51.net/article/62165.htm 1.slice(start,end) # 字符串 2.splice (位置,删除个数,添加元素)# 针对arrary ...
- Python_面向对象_类2
类的几个装饰器方法: @classmethod (类方法):使之无法访问实例变量 class Animal(object): def __init__(self, name): self.name = ...
- MySQL 命令总结
MySQL命令总结 1.数据库操作 查看在当前服务器中有多少个数据库 创建数据库 >CREATE DATABASE db_name DEFAULT CHARACTER SET utf8 COLL ...
- Codeforces 844F Anti-Palindromize 最小费用流
Anti-Palindromize 想到网络流就差不多了, 拆拆点, 建建边. #include<bits/stdc++.h> #define LL long long #define f ...