//produit scalaire de deux vecteurs #include using namespace std; int main() { const int SIZE = 3; double a[SIZE]; double b[SIZE]; cout << "Entrez le premier vecteur :" << endl; cin >> a[0] >> a[1] >> a[2]; cout << "Entrez le deuxieme vecteur :" << endl; cin >> b[0] >> b[1] >> b[2]; double prodScal = 0.; for (int i=0; i<=2; i++) prodScal += a[i]*b[i]; cout << "Le produit scalaire de a et b est " << prodScal << endl; return 0; }