/* This program creates three vectors a, b, c of size n, and compute */ /* the vector c = 2 * a + b. n is inputed by the user */ #include using namespace std; int main( ) {int n, i; double *a, *b, *c; cout << "Please enter the size of the vectors: "<> n; a = new double[n]; // dynamically allocate array b = new double[n]; c = new double[n]; cout << "Input the values for the vector a with size " << n <> a[i]; } cout << "Input the values for the vector b with size " << n <> b[i]; } // compute the vector c for(i=0; i