Question: in c + + 1 4 . 3 7 Midterm 2 : Decrease Write a function named VectorAdjust that takes two parameters: Parameter 1 :

in c++14.37 Midterm 2: Decrease
Write a function named VectorAdjust that takes two parameters:
Parameter 1: a vector v of elements in type double
Parameter 2: an integer variable c
It will then subtract the value of the element in the vector at index c from every element in vector.
For example, if a vector x had contents: 3.0,5.0,7.0,11.0
and the function was called: VectorAdjust( x,1);
After the function call, the contents of the vector would be: -2.0,0.0,2.0,6.0
Write your Main() program to perform the example described above.
using:
#include
#include
using namespace std;
void VectorAdjust(vector& v, int c){
}
int main(){
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!