Guest User

cos

a guest
Sep 23rd, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <vector>
  3. #include <cstdlib>
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8. int buffer = 0;
  9.  
  10. vector<int> wektor;
  11.  
  12. while (cin >> buffer)
  13. {
  14. wektor.push_back(buffer);
  15. }
  16. int a = 0;
  17. for (int i = 0; i < wektor.size(); i++)
  18. {
  19. a += wektor[i];
  20. cout << a << endl;
  21. }
  22. system("pause");
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment