Question: in c + + 1 4 . 3 7 Midterm 2 : Decrease Write a function named VectorAdjust that takes two parameters: Parameter 1 :
in c Midterm : Decrease
Write a function named VectorAdjust that takes two parameters:
Parameter : a vector v of elements in type double
Parameter : 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:
and the function was called: VectorAdjust x;
After the function call, the contents of the vector would be:
Write your Main program to perform the example described above.
using:
#include
#include
using namespace std;
void VectorAdjustvector& v int c
int main
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
