// Przykład użycia klasy vector.
#include <vector>
using namespace std;

double
iloczyn_skalarny(const vector<double> a, const vector<double> b) {
    auto n = min(a.size(), b.size());
    double suma = 0.0;
    for(size_t i = 0; i < n; i++) { 
        suma = suma + a[i] * b[i];
    }
    return suma;
}

#include <iostream>

int
main() {
    vector<double> v1 = {1, 1, 1};
    vector<double> v2 = {1, -1, 1};
    cout << "<v1, v2> = " << iloczyn_skalarny(v1, v2) << endl;
}
