// A program that prints the outer product of two vectors. //Task: Generalize the given code to take a user input of 2 vectors and prints the matrix formed by them (the outer product) of these two vectors. #include using namespace std; int main () { unsigned int size_v1; unsigned int n, m, size_v2; // double A= {{5, 10 },{2, 4}}; /* intialization of vector: */ cout << " please enter the size of vector 1 = "; cin >> size_v1; cout << " Please enter the size of vector 2 = "; cin >> size_v2; cout << size_v1 << "\t" << size_v2 << endl; double vec1 [size_v1] ; double vec2 [size_v2] ; for (n = 0 ; n < size_v1 ; ++n) { cout << "enter vec1 [" << n << "] = "; cin >> vec1[n]; } //for loop for (m = 0 ; m < size_v2 ; ++m) { cout << "enter vec2 [" << m << "] = "; cin >> vec2[m]; } //for loop double A[size_v1][size_v2] ; //notice no initialization! cout << "\n\n"; for (unsigned int i =0 ; i < size_v1 ; ++i) { for (unsigned int j =0 ; j < size_v2; ++j) { A[i][j] = vec1[i]*vec2[j]; cout << " \t A["<