阅读程序2
来源:互联网 发布:欠淘宝消保 编辑:程序博客网 时间:2024/05/21 04:43
- /*
- *Copyright (c) 2016,烟台大学计算机学院
- *All rights reserved.
- *文件名称:zwj.cpp
- *作 者:李落才
- *完成日期:2016年6月5日
- *版 本 号:v1.0
- *
- *问题描述:阅读程序,对照运行结果,领会STL的用法
- *输入描述:
- *程序输出:
- */
- #include <functional>
- #include <numeric>
- #include <vector>
- #include <iostream>
- using namespace std;
- int main()
- {
- vector<int> v(5);
- for (int i = 0; i < 5; i++)
- v[i] = i + 1;
- int sum = accumulate(v.begin(), v.end(), 0);
- cout << "Sum of values == " << sum << endl;
- int product = accumulate(v.begin(), v.end(),1, multiplies<long>());
- cout << "Product of values == " << product << endl;
- return 0;
- }
0 0
- noip2012 阅读程序2
- 阅读程序(2)
- 11-阅读程序2
- 阅读程序2
- 程序阅读2
- 程序阅读2
- 程序阅读(2)
- 阅读程序1、2
- 补充阅读程序-2
- 阅读程序2
- 阅读程序2
- 阅读程序(2)
- 阅读程序2
- 阅读程序2
- 阅读程序2
- 阅读程序(2)
- 阅读程序(2)
- 阅读程序2
- python pip加速安装命令
- 哈弗曼编码实现文件压缩和解压缩
- Springmvc基础四之上传文件
- ACM天梯赛练习L1-022. 奇偶分家
- XUtils3.0使用后续
- 阅读程序2
- Menu 菜单的 学习
- 作业七
- ListView的滑动监听(二)
- vmware8安装centos6
- Android Studio工作中如何改变(设置)选择的最小SDK版本
- angularjs 设置全局变量的7种方法
- JS实现轮播图
- android Activity实现从底部弹出菜单或窗口