Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <vector>
- #include <algorithm>
- using namespace std;
- int zbir(int n) {
- int sum = 0;
- for(int i = 0; i <n; i++) {
- sum += i;
- }
- return sum;
- }
- int main() {
- cout << zbir(10) << endl;
- return 0;
- }
- // 1 1 2 3 5 8 13
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement