My assignment is to write a program that asks a user to enter two 1 x 3 vectors and then calculates the product. [a1 a2 a3] = first vector and [b1 b2 b3] = second vector. I have to create a user defined struct to hold each vector and the answer.
Can anyone guide me in the right direction. I'm a complete noob.. Here's what I have so far but it doesn't even work .
using namespace std;
cout << "Please enter the first vector: " << endl;
cin >> x.a1; and cin >> x.a2 >> and cin >> x.a3;
cout << "Please enter the second vector: " << endl;
cin >> y.b1; and cin >> y.b2 >> and cin >> y.b3;