logo

Crowdly

Який буде результат виконання цього коду? Введіть відповідь точно так, як зазнач...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Який буде результат виконання цього коду?

Введіть відповідь точно так, як зазначено у варіантах екзамену.

#include <iostream>

#include <vector>

#include <numeric>

#include <stdexcept>

using namespace std;

int main() {

vector<int> v;

if (v.empty()) throw logic_error("empty vector");

cout << accumulate(v.begin(), v.end(), 0);

return 0;

}

More questions like this

Want instant access to all verified answers on e-learning.lnu.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!