Created
May 2, 2015 08:13
-
-
Save YukiSakamoto/58c9b8f6014d4befb3cb to your computer and use it in GitHub Desktop.
test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <numeric> | |
#include <functional> | |
#include <vector> | |
#include <iostream> | |
typedef std::vector<int> int_vector; | |
int main(void) | |
{ | |
int_vector v; | |
v.push_back(0); | |
v.push_back(5); | |
v.push_back(10); | |
v.push_back(15); | |
v.push_back(20); | |
std::cout << std::accumulate(v.begin(), v.end(), 0) << std::endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment